Hello,

I'm trying to start using new class based views from the trunk.

I need to rewrite a view which is decorated
django.contrib.auth.decorators.login_required.

How should I go with that?

I was going to write something like LoginRequiredMixin, but I have no
idea how to do this. I need to run my code before .dispatch(), but I
also have to call the old dispatch, but since Mixin aren't inherited
from View, I can't just override method and use super().

Decorating the whole View class doesn't seem like a good idea, either.

Am I missing something?

Thank you very much!

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to