allauth- signup redirect

609 views
Skip to first unread message

Tosin Ayoola

unread,
Feb 25, 2020, 1:28:02 PM2/25/20
to django...@googlegroups.com
halo guy, i'm using allauth for my authentication, but i wan redirect the signup user to a page where they get update their profile detail, how do i override the default success_url after the user have successfully signup , 





Screenshot from 2020-02-25 19-25-36.png

Vishnu Thuletiya

unread,
Feb 25, 2020, 9:15:23 PM2/25/20
to django...@googlegroups.com
In setting.py you can write 
LOGIN_REDIRECT_URL='your redirect path'

On Tue, 25 Feb 2020, 11:57 pm Tosin Ayoola, <tosina...@gmail.com> wrote:
halo guy, i'm using allauth for my authentication, but i wan redirect the signup user to a page where they get update their profile detail, how do i override the default success_url after the user have successfully signup , 





--
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/CAHLKn72_%2BsS%2Bcmz_CATcWWA9DQ7T-7_c86HjSBMfYKW9%2BsWzcA%40mail.gmail.com.

Naveen Arora

unread,
Feb 26, 2020, 2:32:58 AM2/26/20
to Django users

Hi Tosin,


The simplest way would be to override the template account/signup.html with your own copy. If you examine that template you will see the following section:

{% if redirect_field_value %}
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />
{% endif %}

If you remove the if/endif part and change the value inside, the signup page will redirect to a specific page, even if you pass a next argument in the URL:

<input type="hidden" name="{{ redirect_field_name }}" value="/onboarding/" />

Cheers,
Naveen Arora

Tosin Ayoola

unread,
Feb 26, 2020, 11:41:15 AM2/26/20
to django...@googlegroups.com
thanks i've fixed 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...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages