TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Django REST framework with admin-style browseable self-documenting API

59 pointsby jonasvpalmost 14 years ago

6 comments

poalmost 14 years ago
The main REST framework options for Django seem to be:<p>* Piston (<a href="https://bitbucket.org/jespern/django-piston/" rel="nofollow">https://bitbucket.org/jespern/django-piston/</a>)<p>* Tastiepie (<a href="http://toastdriven.github.com/django-tastypie/" rel="nofollow">http://toastdriven.github.com/django-tastypie/</a>)<p>* django-rest-framework (<a href="http://django-rest-framework.org/" rel="nofollow">http://django-rest-framework.org/</a>)<p>* Web Machine (<a href="https://github.com/benoitc/dj-webmachine" rel="nofollow">https://github.com/benoitc/dj-webmachine</a>)<p>* Dagny (<a href="https://github.com/zacharyvoase/dagny" rel="nofollow">https://github.com/zacharyvoase/dagny</a>)<p>* Roll your own (surprisingly common since it's not too hard)<p>I think it's great that there are so many options but it's starting to get bewildering. I think part of the reason for this is how un-restful the default django routing/view technique is. The code samples in the Django documentation don't exactly start beginners down the right track the way other web frameworks do. You can do it the right way, but it requires a fair amount of discipline.<p>I've been toying with replacing all of my django routing/views with a framework (or at least a pattern) that encourages more restful design.
评论 #2628552 未加载
评论 #2628583 未加载
评论 #2628605 未加载
limistalmost 14 years ago
If you're looking for a REST framework for Django, be sure to see this table:<p><a href="http://www.djangopackages.com/grids/g/api/" rel="nofollow">http://www.djangopackages.com/grids/g/api/</a><p>At this point (mid-2011) Django-Tastypie is the clear winner by its number of authors, updated codebase, documentation, and overall activity.
评论 #2629720 未加载
ramsalmost 14 years ago
Do not believe any programmer, manager, or salesperson who claims that code can be self-documenting or automatically documented. It ain't so. Good documentation includes background and decision information that cannot be derived from the code. - Jef Raskin on self-documenting code<p><a href="http://queue.acm.org/detail.cfm?id=1053354" rel="nofollow">http://queue.acm.org/detail.cfm?id=1053354</a><p>The project page itself says 'self-describing'
评论 #2628458 未加载
rndvalmost 14 years ago
I wish there was something like Selector's named arguments (<a href="http://lukearno.com/projects/selector/" rel="nofollow">http://lukearno.com/projects/selector/</a>):<p>Selector().add(path, GET=get_entity, PUT=put_entity, ...)<p>It's nicer with a mapping file:<p>/path GET get_entity PUT put_entity
ajessupalmost 14 years ago
What are the strengths/weaknesses of this vs. django-piston?
评论 #2628382 未加载
评论 #2628662 未加载
jtchangalmost 14 years ago
Been looking for alternative frameworks to piston. Will be checking this out.
评论 #2628629 未加载