GSoC 2007 Status Update: Django REST interface

1 view
Skip to first unread message

Andreas Stuhlmüller

unread,
Jun 1, 2007, 12:46:24 PM6/1/07
to django-d...@googlegroups.com
This is the first weekly status update for my Summer of Code project,
a generic REST interface for Django. If you haven't seen it, take a
look at http://code.google.com/p/django-rest-interface/.

This week, I have started checking in code. I am always happy about
feedback. Add a few lines to your (non-production!) urls.py [1], make
your models available in XML or JSON format and tell me what works for
you and what doesn't.

Compared to my timetable, I have managed to start a few things I
planned to get done next week or the week after (create/update/delete
operations, basic url patterns generator) and I have yet to add the
option to format output with templates, something I wanted to get done
by today.

Besides templates, I am going to work on error handling, pagination,
the option to limit the model fields exposed by the API, a
_load_put_and_files equivalent to _load_post_and_files and the
inclusion of resource urls in serialized output until next Friday.

Regards,
Andreas

[1] Like this: http://django-rest-interface.googlecode.com/svn/trunk/django_restapi_tests/urls.py

Amit Upadhyay

unread,
Jun 1, 2007, 6:13:17 PM6/1/07
to django-d...@googlegroups.com
On 6/1/07, Andreas Stuhlmüller <stuhlm...@gmail.com> wrote:
This week, I have started checking in code. I am always happy about
feedback. Add a few lines to your (non-production!) urls.py [1], make
your models available in XML or JSON format and tell me what works for
you and what doesn't.

I contributed patch for http://code.djangoproject.com/ticket/547, and tho did not object much when it was closed in favor of http://code.djangoproject.com/ticket/115, but I feel both your approach and #115 are wrong.

Django is a web development framework, and not model development. REST (XMLRPC/SOAP) API are created to expose webservices, which by definition could be anything, not just models. CRUD is myopic world view. Have you seen the API's that Flickr/Delicious/FaceBook exposes? *None* of them are (strictly) CRUD related. What should you make easy is making any python function available through REST, and that function can in turn implement CRUD if you want. I am not against CRUD api, but thats a very small, and in my opinion unused subset of what REST etc would be used for.

Developers, please relook at 547, and compare it with 115. 547 is closed by jacob saying " This is a subset of #115." which I feel is not the case, as #115 is "Models CRUD via web services".

Related bug: http://code.djangoproject.com/ticket/552

--
Amit Upadhyay
Vakow! http://www.vakow.com
+91-9820-295-512

cur...@tradingblox.com

unread,
Jun 1, 2007, 4:56:18 PM6/1/07
to django-d...@googlegroups.com
This email address is no longer in service. Please use curtis...@yahoo.com.

Thanks.


cur...@tradingblox.com

unread,
Jun 1, 2007, 4:56:44 PM6/1/07
to django-d...@googlegroups.com

cur...@tradingblox.com

unread,
Jun 1, 2007, 4:57:13 PM6/1/07
to django-d...@googlegroups.com

cur...@tradingblox.com

unread,
Jun 1, 2007, 4:57:32 PM6/1/07
to django-d...@googlegroups.com

cur...@tradingblox.com

unread,
Jun 1, 2007, 4:57:54 PM6/1/07
to django-d...@googlegroups.com

cur...@tradingblox.com

unread,
Jun 1, 2007, 4:58:19 PM6/1/07
to django-d...@googlegroups.com

cur...@tradingblox.com

unread,
Jun 1, 2007, 4:58:40 PM6/1/07
to django-d...@googlegroups.com

cur...@tradingblox.com

unread,
Jun 1, 2007, 4:58:56 PM6/1/07
to django-d...@googlegroups.com

cur...@tradingblox.com

unread,
Jun 1, 2007, 4:59:12 PM6/1/07
to django-d...@googlegroups.com

cur...@tradingblox.com

unread,
Jun 1, 2007, 4:59:34 PM6/1/07
to django-d...@googlegroups.com

Andreas Stuhlmüller

unread,
Jun 1, 2007, 6:59:24 PM6/1/07
to django-d...@googlegroups.com
On 6/2/07, Amit Upadhyay <upad...@gmail.com> wrote:
> Django is a web development framework, and not model development. REST
> (XMLRPC/SOAP) API are created to expose webservices, which by definition
> could be anything, not just models. CRUD is myopic world view.

Thanks for your comment!

You are right in saying that making models CRUD-accessible is just a
small part of what should be possible with the REST API. That's why my
proposal includes two parts: Easily configured CRUD method access
patterns for models on the one hand and resources that don't
correspond 1:1 to models on the other hand. I will take a closer look
at the tickets you opened when I get to the second half of my
proposal, but note that what I am working on is not XMLRPC or SOAP.

Regards,
Andreas

Reply all
Reply to author
Forward
0 new messages