Héllo Bertrand, Yesterday I read a Ruby on Rails tutorial and this gave me an idea of what > could IMO be a nice feature: viewsets. > I therefore started a tiny project, > django-viewsets<https://github.com/BertrandBordage/django-viewsets> > (djangonauts > have weird reflexes… ^^). *Everything is explained there.* > > What do you think? Could this be an interesting feature? “The next level > of class-based views”? A *contrib* application? >
It's very interesting and it might be why a similar thing exists in the admin but not pluggable yet. There is a ticket for this issue: https://code.djangoproject.com/ticket/16213 I made another implementation of this https://github.com/django-composite/django-composite/blob/master/composite/urls.py - It's named UrlCollection since it's a collection of urls... - Support callable, views function and CBVs - It's possible to provide a default application_namespace (see https://code.djangoproject.com/ticket/11642) but overridable at include time - It's also possible to nest UrlCollections (equivalent your ViewSets class) - It's possible to inherit AdminSite and ModelAdmin from UrlCollection and implement the missing methods/properties... But there is no particular support of GCBV (ListView, CreateView...), it's a good idea I will add it. Please have a look at it, I'll do the same with multiviews and viewsets and to try to advance the discussion further maybe merge the three of them ? -- 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]. Visit this group at http://groups.google.com/group/django-developers?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
