Thursday, September 26, 2019

Re: redirect authenticated user in create view in django

Hey,

you could use if request.user.is_autenticated to identify if a user has authenticated, see documentation on Django.

--
Regards
Deep L Sukhwani


On Wed, 25 Sep 2019 at 22:39, saeed albooyeh <saeedalbooyeh@gmail.com> wrote:
hi
i used CreateView for registration in my project and i wanna prevent authenticated user from accessing to the register url and redirect it to another page
can anyone tell me how can i do it?

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/django-users/a87cee2c-bfc9-4086-aefd-2342f6b55da7%40googlegroups.com.

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAEMqiPcfSSHhopJiEM%2BdGgXoia_3hz1ei6iXOJ3890kJD1b_Ng%40mail.gmail.com.

No comments:

Post a Comment