Django REST framework 2.3 released: ViewSets and Routers
django-rest-framework.org
Django REST framework 2.3 released: ViewSets and Routers
1–10 of 37 posts
Re: Django REST framework 2.3 released: ViewSets and Routers
#2Running Chrome 28.0.1496.0 dev
Re: Django REST framework 2.3 released: ViewSets and Routers
#3What's with the nav box completely blocking the document? http://cl.ly/OnPN Running Chrome 28.0.1496.0 dev
Edit: Are you seeing this for all browser widths, or just specific ranges?
Re: Django REST framework 2.3 released: ViewSets and Routers
#4Re: Django REST framework 2.3 released: ViewSets and Routers
#5Re: Django REST framework 2.3 released: ViewSets and Routers
#6Anyone care to weigh in about using this vs., say, TastyPie?
The auto generated web interface is nice though.
Re: Django REST framework 2.3 released: ViewSets and Routers
#7Anyone care to weigh in about using this vs., say, TastyPie?
Last I tried this (2.1?) it took a hell of a lot more boilerplate than TastyPie, and I had a few problems that necessitated changing the source a bit. But maybe I was using it wrong (didn't spend a huge amount of time with it). The auto generated web interface is nice though.
Regarding the boilerplate - IIRC the tutorial starts you off with lots of boilerplate then shows you how to refactor it so it is not needed.
Re: Django REST framework 2.3 released: ViewSets and Routers
#8Re: Django REST framework 2.3 released: ViewSets and Routers
#9Anyone care to weigh in about using this vs., say, TastyPie?
Last I tried this (2.1?) it took a hell of a lot more boilerplate than TastyPie, and I had a few problems that necessitated changing the source a bit. But maybe I was using it wrong (didn't spend a huge amount of time with it). The auto generated web interface is nice though.
The boilerplate comment is definitely valid, and is pretty much what this release was intended to address.
We've now introduced ViewSets (an extension of class based views that is similar to Rail's controllers) and Routers, which make it super quick and easy to get your API up and running.
The updated README should give you a good idea how simple the APIs can be now:
https://github.com/tomchristie/django-rest-framework
I get the impression that what TastyPie does really well is convention-over-configuration - making a bunch of really sensible design decisions on your behalf. What (I hope) REST framework does really well is staying close to Django's conventions, and being easy to customize all the way through, plus of course the browseable API. Either way, there's certainly plenty of folks happy with both frameworks.
Re: Django REST framework 2.3 released: ViewSets and Routers
#10Anyone care to weigh in about using this vs., say, TastyPie?
TastyPie is more "complete" than Django REST framework. It has URL routing, which makes setting up an API namespace in your URLs super simple. It has queryset filtering from the URL (e.g. /articles/?author=1). Django REST framework relies on another third-party app to do this. It also has caching built-in. I find it's internal interface a little bit more confusing the Django REST framework's, but that could be that I am just more familiar with Django CBVs.