Monday, July 30, 2018

Re: Authentication (Login view)

On 2018-07-30 07:33, SAD BOIII wrote:
> ?guys, how can i stop logged in users from accessing the log in page again
>

In your view for the login page:

if user.is_authenticated():
return HttpResponseForbidden()

Or something similar?

--
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/9f8ccb51-e08e-791a-8d45-95b5a1b9f73f%40stacktrace.dk.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment