Le 8 juin 08 à 16:11, Ivan Sagalaev a écrit :
>
> David Larlet wrote:
>> This is not a secret that I'm interested in both Django and Semantic
>> Web. I'm following discussion about Django+REST for more than two
>> years and when I realize that newforms-admin branch will use class-
>> based generic views [1], I decided that it's probably the right  
>> moment
>> to do something with that.
>>
>> [1] http://code.djangoproject.com/ticket/6735
>
> David, this is a good news for us REST-fans :-). However don't you  
> think
> it could better start living as a separate app? It could get some  
> early
> adoption without needing to pursue inclusion in trunk.

Of course, I just want to know if it could be possible as a middle- 
term goal because it doesn't involve the same energy if it's for me, a  
couple of REST-fans or the trunk (for example, tests and documentation  
are not exactly the same).

Anyway, I'll setup a repository and add some generic tests, that's the  
minimum.

>
>>         * Handle receivers in order to use it as an API (for the
>> moment,
>>           it assumes that you receive formencoded data), need more
>> reflexion.
>
> How about registering handlers for specific mimetypes that would  
> convert
> from raw data into a python dict. ModelView will have a built-in  
> method
> for formencoded mimetype and a derived class could add its own like  
> this:
>
>     @register_mimetype('application/atom+xml')
>     def atom_to_dict(self, data_stream):
>         # parse data_stream
>         return {
>             'attr': 'value',
>         }

Yes, that's one of the approaches I'm thinking about, as for  
permission, using decorators looks to be interesting. I need to write  
some doc about that too.

Thanks for your answer,
David



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
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