python - Return some attributes only in detail view in django-tastypie -
i have attribute want expose in api. calculating attribute costly, want make available in detail view (aka /api/foo/1/
) , not list view(aka /api/foo/
).
how can tastypie?
you can "use_in" resource field attribute, has options of "all", "list" , "detail".
you can read more here
Comments
Post a Comment