Re:REST framework 2 released: Simple, beautiful, browsable W...
by megaman821 on Tuesday October 30, 2012 @03:05PM
(#4718916)
This looks pretty good. I like that it leverages Django's CBVs. I couldn't tell from the docs if you could do queryset filtering though the URL's querystring (e.g http://api.example.com/blogs?author=10).
[ Parent
| on HN ]
Re:REST framework 2 released: Simple, beautiful, browsable W...
by tomchristie on Wednesday October 31, 2012 @06:48AM
(#4722180)
If using the generic CBVs you can override .get_queryset() to implement filtering just as you would with regular Django CBVs.
There's also an outstanding pull req to build in support for django-filter and other filtering backends which now just needs some docs, and which I plan to have merged in within the next few days or so. https://github.com/tomchristie/django-rest-framework/pull/29... That'll make it easier to do more complex filtering stuff. (And eventually have the filters be presented in the Browsable API)
Re:REST framework 2 released: Simple, beautiful, browsable W...
by megaman821 on Thursday November 01, 2012 @09:07AM
(#4727248)
I have a mixin that often use to do basic querystring filtering with CBVs, but it is nowhere near as comprehensive as http://django-tastypie.readthedocs.org/en/latest/resources.h....