Re: ModelView

2010-07-12 Thread Matthias Kestenholz
such a class can take advantage of that. Its use should look something > like this: > > >    [] > > Anybody likes the idea? There are a few remarks I'd already like to > make: > - I'm not sure 'ModelView' is the right name for this, since not the >

Re: ModelView

2010-07-12 Thread reg_gc
> Anybody likes the idea? Sounds good. Unfortunately I didn't read long-long thread about class-based views :( > - I'm no fan of 'class Meta' myself, but I've chosen it here to be > compatible with ModelForm I'm too -- You received this message because you are subscribed to the Google Groups "D

ModelView

2010-07-12 Thread Roald
like this: * in urls.py: (r'^blog/', BlogPostView), * in views.py class BlogPostView(ModelView): class Meta: model = BlogPost The base class ModelView should be implemented something like this: class ModelView(object): def __

Re: Introducing ModelView, a RESTful class-based view of your resources

2008-06-20 Thread tifosi
ve a suggestion? > > I'll think about that this weekend, I have some ideas about the way to > handle that in an easy way. >> >> >> (Sorry for my English, I'm French) > > Nobody is perfect ;) > > Cheers, > David > > ps : you can join us

Re: Introducing ModelView, a RESTful class-based view of your resources

2008-06-20 Thread David Larlet
Salut Clément, Le 19 juin 08 à 16:15, tifosi a écrit : > > Hi David, > > Thank for your code and the repository, I use the django-rest- > interface and > it's good news, that someone continue the job. > > I would like to get nested resources (e.g.: /articles/1/comments/ or > /user/username/jobs/

Re: Introducing ModelView, a RESTful class-based view of your resources

2008-06-20 Thread [EMAIL PROTECTED]
ername/jobs/) and the problem is that you have to pass statically > the queryset. I think I can use a decorator but I don't know how I can do > this. Do you have a suggestion? > > Regards > > Clément > > (Sorry for my English, I'm French) > > -- > View this mes

Re: Introducing ModelView, a RESTful class-based view of your resources

2008-06-19 Thread tifosi
et. I think I can use a decorator but I don't know how I can do this. Do you have a suggestion? Regards Clément (Sorry for my English, I'm French) -- View this message in context: http://www.nabble.com/Introducing-ModelView%2C-a-RESTful-class-based-view-of-your-resources-tp17718460p180

Re: Introducing ModelView, a RESTful class-based view of your resources

2008-06-12 Thread David Larlet
Le 9 juin 08 à 13:52, David Larlet a écrit : > > 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 tha

Re: Introducing ModelView, a RESTful class-based view of your resources

2008-06-09 Thread David Larlet
ent, >> 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 formenco

Re: Introducing ModelView, a RESTful class-based view of your resources

2008-06-08 Thread Ivan Sagalaev
hout needing to pursue inclusion in trunk. > * 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 da

Introducing ModelView, a RESTful class-based view of your resources

2008-06-08 Thread David Larlet
moment to do something with that. [1] http://code.djangoproject.com/ticket/6735 The attached code is built on top of this patch, I need to discuss with jkocherhans in order to avoid duplicate code but consider it more as a proof-of-concept for now, here is the (incomplete) doc: Model