How to fix URL link redirecting from login?

35 views
Skip to first unread message

nobody

unread,
Nov 23, 2013, 7:40:21 PM11/23/13
to django...@googlegroups.com
Hi,

I made an URL link in an email, if I have logged into the web site, then I can click the link, it would bring to a valid web page. But if I haven't logged log in, to click the link would result an error "page not found". How can I fix it to check if a user has not logged in, it opens a log page to ask the user to log in rather than an error page, after the user loges in, it would redirect to the link URL page?

Thank you.

Kind regards.





Timothy W. Cook

unread,
Nov 24, 2013, 5:16:11 AM11/24/13
to django...@googlegroups.com
Check in the docs for the instructions on decorating your views to
restrict to authenticated users. This also talks about redirecting to
a page instructing them to login. Sorry, I don't have the link
available right now.
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/ff130970-c4d4-4a96-8748-d386217b9cf5%40googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.



--
MLHIM VIP Signup: http://goo.gl/22B0U
============================================
Timothy Cook, MSc +55 21 94711995
MLHIM http://www.mlhim.org
Like Us on FB: https://www.facebook.com/mlhim2
Circle us on G+: http://goo.gl/44EV5
Google Scholar: http://goo.gl/MMZ1o
LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook

Vibhu Rishi

unread,
Nov 24, 2013, 8:14:23 AM11/24/13
to django...@googlegroups.com






--
Simplicity is the ultimate sophistication. - Leonardo da Vinci
Life is really simple, but we insist on making it complicated. - Confucius

nobody

unread,
Nov 25, 2013, 11:35:34 PM11/25/13
to django...@googlegroups.com
Thanks for your advice and all responses, that works well.

Kind regards.
Reply all
Reply to author
Forward
0 new messages