Hi all,

In the Morfeo [1] FLOSS Community (Spanish/European) we use Django and
django-restapi in many projects. One of them is EzWeb [2], a free
mashup platform (still beta, or even alpha ;) ) which serves contents
in JSON through REST server.
After working with great intensity with django-restapi we discovered
some fails and some unimplemented features, but our code is so large,
and I don't know whether your code proposal is backward compatible or
whether it will be added to trunk of django-rest-interface.
Anyways, we will study your code and if you agree, we can contribute
in a branch leaded by you.

Regards.


REF's:
1. http://morfeo-project.org/lng/en
2. http://ezweb.morfeo-project.org/?lng=en

On 6 mar, 23:04, Jared Flatow <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> Forgive me if this is slightly off topic, but I hope to get some
> feedback on the design of what I think is an improved version of the
> django-rest-interface. I have posted a gzipped archive of the code and
> an example application here:
>
> http://code.google.com/p/django-rest-interface/issues/detail?id=26
>
> Please see the file examples/views.py for a better idea of what I
> intend usage to look like.
>
> All 'resources' derive from a single base class, including collections
> (see resources.py). A generalized Collection simply has the ability to
> delegate to child resources. A ModelCollection maps to a Django Model,
> whereas a ModelObjectResource maps to a model instance (models.py).
> SerDes (serdes.py) are used to serialize/deserialize models. It is
> straightforward to wrap a Django serializer with a SerDes, but writing
> your own allows you to create APIs that don't map exactly 1:1 with
> your models.
>
> Authentication is implemented using a decorator syntax. It can be
> applied at the class level or at the individual CRUD level (method
> level takes precedence). There is also a deauthenticate decorator so
> that you can mark the class as having a certain level of
> authentication and relax this for particular methods.
>
> Here is a very simple example of how you might create an API for a
> Publication model, using Django's builtin JSON serializer and HTTP
> basic authentication:
>
> @authenticate(HttpBasicAuthentication())
> class PublicationCollection(ModelCollection):
>      allowed_methods = ('GET', 'POST')
>
> Publications = PublicationCollection(Publication, JSONSerDes)
>
> You could then put something like this in your urls.py:
>
> urlpatterns = patterns('', (r'^publications(/(?P<id>.*))?$',
> Publications))
>
> If anyone is interested, please take a look at the rest of the code, I
> am very curious to get feedback on its design and utility.
>
> Thanks!
> jared
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to