News for hackers. Stuff that matters.
Re:Backbone.js and Django by izak30 on Tuesday July 05, 2011 @07:26PM (#2731996)
You can directly implement views based on the request method with django's class based views (View) in 1.3. The dispatch method does almost exactly what your restful function does.

Just inherit from View, and define get(), post(), etc.

Re:Backbone.js and Django by rlander on Tuesday July 05, 2011 @09:04PM (#2732185)
Or you could create restful APIs simply with django-piston, django-tastypie or (my new personal favorite) django-dagny.
Re:Backbone.js and Django by izak30 on Tuesday July 05, 2011 @09:32PM (#2732247)
Yes, and there is already a decent wrapper for backbone and tastypie http://joshbohde.com/blog/backbonejs-and-django This is my personal favorite.
Re:Backbone.js and Django by numix on Wednesday July 06, 2011 @12:39AM (#2732588)
Thanks for the recommendation! I'm glad you like it.

As far as wrappers for backbone and tastypie, I think https://github.com/PaulUithol/backbone-tastypie is a pretty good starting point, and a little more complete than what I wrote there.

Re:Backbone.js and Django by izak30 on Wednesday July 06, 2011 @09:36AM (#2733788)
Oh, I thought they were related until now. This one is actually what I _use_. Yours is what came up in a search.
Re:Backbone.js and Django by rlander on Tuesday July 05, 2011 @10:15PM (#2732339)
Nice tutorial, thanks!
Re:Backbone.js and Django by jsdalton on Tuesday July 05, 2011 @10:25PM (#2732358)
I'll throw Django REST Framework in the mix there as well: http://django-rest-framework.org/

Why? See http://django-rest-framework.org/howto/alternativeframeworks...

Re:Backbone.js and Django by joshontheweb on Tuesday July 05, 2011 @08:44PM (#2732142)
I was going to suggest this as well. Each resource can be a class that has a function defined for each method.