I have a django project in which there is a UserProfile having a OneToOne to the User model. It uses django-allauth for registration.
I am accepting registration via account and social account. Upon signing up, i want the user to be redirected to a page to create the UserProfile for that user account.
How could i do that ?
I have read, there is 1 signal called user_signed_up, can it be used to redirect the user to certain page ? I tried this code below, but it doesn't redirect me to the page i wanted.
@receiver(user_signed_up, dispatch_uid="some.unique.string.id.for.allauth.user_signed_up")
def do_stuff_after_sign_up(sender, **kwargs):
request = kwargs['request']
user = kwargs['user']
return redirect ('/test/')
any help will be greatly appreciated. thanks :)