On 4 October 2010 19:44, Luke Plant <l.plant...@cantab.net> wrote: > On Mon, 2010-10-04 at 19:37 +0200, Łukasz Rekucki wrote: > >> The only problem is decorators: You can't just simply apply >> login_required() to the class or the dispatch() method. Otherwise, I >> like this approach. > > It works fine: > > http://bitbucket.org/spookylukey/django-class-views-experiments/src/tip/classmethod.py#cl-40 > > (I have 'as_view' instead of 'dispatch'). My MyView.dispatch method > could have decorators applied inside the actual class (as long as they > are adjusted for being method decorators and not function decorators, in > common with all other solutions).
You're right, my bad. It's 8pm and i'm still in work - probably shouldn't read any more code today :). That said, my preferences would be: magicnew_with_configure, classmethod, magicnew, copyoncall. -- Łukasz Rekucki -- 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.