On Mon, Jul 12, 2010 at 2:13 PM, Roald <downa...@gmail.com> wrote: > Hi all, > > > There is a discussion 'Class based generic views in 1.3?' in this > list. I would like to suggest an alternative: ModelViews. There > normally are multiple standard views associated with one model, and > 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 > class itself but its requesthandler properties are the actual views. > On the other hand, the name is too nice not to be used. > - I'm no fan of 'class Meta' myself, but I've chosen it here to be > compatible with ModelForm >
I sort-of like this, but don't see why anything like this should land in Django core, because it doesn't improve the generic view usecase in any significant manner IMHO. There exist several implementations of this idea: http://github.com/matthiask/modelviews (my own) http://code.welldev.org/django-modelviews/wiki/Home ... and there might well be others which I am not aware of. Putting request specific variables on the view instance like you propose it is still a bad idea though. It leads to cross-pollination of different request handling stages and unclean separation of concerns. Oh well, that was a reply to "the other thread"... Matthias -- Django CMS building toolkit: http://www.feinheit.ch/labs/feincms-django-cms/ -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-develop...@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.