Tuesday, February 25, 2020

Re: allauth- signup redirect

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

On Tuesday, 25 February 2020 23:58:02 UTC+5:30, Tosin Ayoola 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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/7e5a5842-1aef-4afe-9cd1-46e1e40534fb%40googlegroups.com.

No comments:

Post a Comment