django-braces <https://github.com/brack3t/django-braces> have a LoginRequiredMixin. Using it is a much cleaner solution to overriding the dispatch method.
On Sat, Jul 13, 2013 at 6:56 PM, Some Developer <[email protected]>wrote: > I make heavy use the login_required decorator and for the most part it is > extremely easy to use when using FBVs but when using CBVs one either has to > add a dispatch method to the class calling the super classes dispatch > method or you need to put the login_required in the url configuration which > feels rather nasty. > > Is there a better way to handle the login_required decorator when using > CBVs at all? > > Forgetting to add the login_required decorator to an important view could > result in a large security hole as well. > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to > django-users+unsubscribe@**googlegroups.com<django-users%[email protected]> > . > To post to this group, send email to [email protected]. > Visit this group at > http://groups.google.com/**group/django-users<http://groups.google.com/group/django-users> > . > For more options, visit > https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out> > . > > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/django-users. For more options, visit https://groups.google.com/groups/opt_out.

