This is a resource.
class TagResource(ModelResource):
user = tastypie.fields.ForeignKey(UserResource,'user')
class Meta:
queryset = Tag.objects.all()
resource_name = 'tag'
authorization= Authorization()
object_class = Tag
filtering = {
'name' : ALL,
}
simple request
http://localhost:8000/api/v1/tag/1/?format=json
returns empty resource_uri
{"created": "2014-03-26T15:14:11.928068",
"id": 1, "name": "test",
"resource_uri": "", "user": ""}
Why?
I tried
def hydrate_resource_uri(self, bundle):
return bundle.get_resource_uri()
This did not work, and I am sure that this should not require special care.
What am I missing?
source
share