Handle case where user or profile form is invalid, send the user back to them to fix any errors
This commit is contained in:
parent
30083d573c
commit
117f4e8dc2
1 changed files with 8 additions and 0 deletions
|
@ -47,6 +47,14 @@ def setup_1_confirm_profile(request):
|
||||||
# Call the view to trigger sending a confirmation email, but ignore it's response
|
# Call the view to trigger sending a confirmation email, but ignore it's response
|
||||||
user_send_confirmation_email(request)
|
user_send_confirmation_email(request)
|
||||||
return redirect('setup-2-pick-categories')
|
return redirect('setup-2-pick-categories')
|
||||||
|
else:
|
||||||
|
context = {
|
||||||
|
'user': user,
|
||||||
|
'profile': profile,
|
||||||
|
'user_form': user_form,
|
||||||
|
'profile_form': profile_form,
|
||||||
|
}
|
||||||
|
return render(request, 'get_together/new_user/setup_1_confirm_profile.html', context)
|
||||||
else:
|
else:
|
||||||
return redirect('home')
|
return redirect('home')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue