In your settings.py create this variables
On Monday, May 27, 2013 2:24:52 AM UTC, nany wrote:
-- LOGIN_URL = '/login_url/'
LOGIN_REDIRECT_URL = '/redirect_url/'
your can also try this
On Monday, May 27, 2013 2:24:52 AM UTC, nany wrote:
Thank your help,but could you tell me how to set in setting.py?And I preffer to use the code style in funtional view ,like@login_required(login_url='abclogin/') def get_list(request):passIn class based view,I can't do like this?
在 2013年5月25日星期六UTC+8下午11时23分39秒,Sergiy Khohlov写道: you can set it in setting.py fileMany thanks,
Serge
+380 636150445
skype: skhohlovOn Sat, May 25, 2013 at 9:33 AM, nany <happy...@gmail.com> wrote:@method_decorator(login_required) but how to add "login_url=''/login/" to login_required in function view, I use @login_required(login_url='--login/') but in class based view, how? Anyone help?Thank you.
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...@googlegroups.com .
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en .
For more options, visit 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 django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/4b83cbf4-9153-40db-b818-c6e15a53e2b7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment