Need help

13 views
Skip to first unread message

ad...@codism.io

unread,
Nov 23, 2018, 12:19:33 PM11/23/18
to Django users
If suppose a user is logged in to the system, and then the user goes to the url and go to register page using the url for ex. localhost/register. We don,t want this to happen. We don't want the user to go to the register page when he is already logged in. How can we resolve this issue? Please help

رهام صادقی

unread,
Nov 24, 2018, 1:48:06 AM11/24/18
to django...@googlegroups.com
Hi,
you can use request.user and check for this if exists.
If so you can redirect this user to another page or in your template do not show any thing or pop up some errors.

‫<‪ad...@codism.io‬‏> در تاریخ جمعه ۲۳ نوامبر ۲۰۱۸ ساعت ۲۰:۴۹ نوشت:‬
If suppose a user is logged in to the system, and then the user goes to the url and go to register page using the url for ex. localhost/register. We don,t want this to happen. We don't want the user to go to the register page when he is already logged in. How can we resolve this issue? Please help

--
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/93e2d87e-83e1-4656-8dab-153dfb41e5e9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages