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

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -