On Dec 3, 8:56 pm, Tobia Conforto <tobia.confo...@gmail.com> wrote: > I haven't taken the time to translate the whole django.views.generic > package to this new design, but I will do so shortly, assuming I get > some kind of positive feedback. The existing functionality (the > various generic views and mixins) should be fairly easy to port to the > new design.
It is very important to make sure that you can support all the features supported by Django currently. The devil is in the details. Trying to pass Django's test suite with your version of class based views is a good way to test if you actually do achieve feature parity. I don't know much about class based views, but I do know that their design thread at django-developers was _very_ long. So, there might be reason why things are done as they are. > This is a slightly different design, so there are bound to be a few > incompatibilities. For example in my code the dispatched methods (get, > post...) don't receive the request object and parameters, because they > were already passed to __init__ and it wouldn't make sense to pass > them again. > > I'm not familiar with Django practices about backwards compatibility. > If it's really important not to break old code, I guess the new style > classes could be made to keep the same interface as existing ones, > including a dummy as_view() method. But it would pollute the code with > old cruft. Or they could be implemented in a new package. I need > further directions on this issue. Django has a strict backwards compatibility policy. If the users have used public APIs, their code must work in the next release (barring data-corruption / security issues). Deprecation takes two releases. This means that you must provide backwards compatibility wrappers / methods. - Anssi -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.