django-restful-model-views contribution update

April 6, 2007

I’ve updated the django-restful-model-views contribution, based on feedback I’ve received, primarily to make this a more generic REST API (not just model based). This update also begins implementing some ideas borrowed from Ruby on Rails. I have reproduced the changelog here for convenience:

4/6/2006

  • added extra checks to restful_urls.py in case there is not RESTFUL_APPS setting.
  • extracted Resources and Resources.Resources_Member classes. Model based resources now implement these classes. This allows for building resources that are not model based as well as those that are.
  • created corresponding ResourceDispatcher -> ModelResourceDispatcher class hierarchy.
  • updated the code to account for clients that can send direct put and delete methods on resource members.
  • The hidden ‘_action’ post field name has been changed to ‘_method’, as Ruby on Rails does.
  • updated the unit tests and documentation accordingly and did some general tidying.

I also feel obliged to point to a blog post that I suspect many people may not have seen: Improving Django: Generic views for RESTful web services. The author’s proposal is very close to what I proposed in my last blog post on the subject, Evolving a RESTful Django Contribution, but he goes much further, proposing specific approaches for how to configure a more generalized ReST API for resources that are not mapped to models and also goes further than I have in thinking about how to respond to requests in different formats. As I’ve said before, things move quickly in the Django community, and the work around ReST could become a very exciting area. Because our ideas seem so close, and because I already have some working code that addresses things like organizing view code and dispatching requests while the author has a design for a fully realized ReST API, I’ve suggested to the author that our work would be a natural fit and that we should collaborate on the final contribution. Stay tuned.

3 Comments »

Comment by David, biologeek
2007-04-06 13:53:50

Great news, I hope you will be able to work together! (and to be honest, I hope I will be too).

About django-restful-model-views, REST != ReST (== ReStructuredText). Joe Gregorio articles are a great introduction to REST: http://www.xml.com/pub/at/34 that can be linked in the project homepage.

Comment by admin
2007-04-06 15:36:28

I cleaned up the Google site. Would you like to lend a hand too? I could definitely use the help…I don’t get a lot of time to work on OSS projects like this, and then there’s the little detail of me not being very experienced with either Django or REST…

 
 
Comment by David, biologeek
2007-04-09 21:43:24

Honestly, I haven’t got a lot of time too but this project is really intersting. Let me know if I can help you. I have put my gmail e-mail in the right field of this comment.

 
Name (required)
E-mail (required - never shown publicly)
URI
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong> in your comment.