Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What have you found to be the best way to implement a REST interface? I noticed the @ajax_request shortcut but nothing response code specific. I've been using Django-Piston which has been... challenging at best.


I have used both Piston and Tastypie, and by far prefer Tastypie. Tastypie is actively maintained and super flexible. It gets you working out of the box with the django ORM, but also has the hooks to plug in everything you want.



If your rest interface is deeply tied to the Django DB, I'd suggest TastyPie.

Otherwise Django-Piston sadly is the way to go.


I find it to be exactly the opposite. Django Tastypie is in no way tied to the Django Orm.


It's not intrinsically tied to the ORM. Sorry if I gave that impression. However it has many helpful shims and subclasses that interface with the ORM.

I'm looking at ModelResource as my example.

If you aren't working with a NoSQL database or a search engine, or grabbing data from an tertiary resource then the sheer complexity found in TastyPie might not be for you.

Django-Piston doesn't offer many features, but its dead simple in its usage.


Yep, I agree. Tastypie has a steeper learning curve, due to beeing more flexible. When I used Piston, jespern was not actively maintaining it, but using a private branch for bitbucket.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: