redirect authenticated user in create view in django

63 views
Skip to first unread message

saeed albooyeh

unread,
Sep 25, 2019, 1:09:15 PM9/25/19
to Django users
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?

Deep Sukhwani

unread,
Sep 26, 2019, 6:59:41 PM9/26/19
to django...@googlegroups.com
Hey,

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

--
Regards
Deep L Sukhwani


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