GSoC 2007 Status Update III: Django REST interface

Skip to first unread message

Andreas Stuhlmüller

Jun 16, 2007, 7:30:18 PM6/16/07
This is the third weekly status update for my Summer of Code project,
a generic REST interface for Django [1].

I spent the SoC-part of this week mostly thinking about automated URL
pattern generation, wrote some code and added a few tests that
demonstrate how to use this feature. Currently, you can:
1. Let the REST interface generate all your API URLs automatically.
2. Give a custom base URL and let the REST interface do the rest.
3. Subclass model_resource.Collection, overwrite Collection.get_entry
and (if you want to filter the data returned), and use
arbitrary custom URLs.

I am not completely happy with how this works yet. Using custom URLs
should be as intuitive as using automated URLs, and I don't think
that's the case yet. If you see how things could be improved, please
let me know.

Other changes I made this week include the option to restrict model
field access via expose_fields and better error handling (all
exceptions are caught in Collection.dispatch, the Responder class is
responsible for returning a nicely formatted error message).

Besides thinking about how custom RESTful URLs could be implemented in
a more intuitive way, my main task for next week is to think about the
relationship between the REST interface and authentication. It should
be possible to have different levels of access for authenticated and
unauthenticated users.

Criticism, ideas and suggestions are welcome!



Reply all
Reply to author
0 new messages