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).

Luke

-- 
"Doubt: In the battle between you and the world, bet on the world." 
(despair.com)

Luke Plant || http://lukeplant.me.uk/

-- 
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.

Reply via email to