Closed dragon-fire-fly closed 1 year ago
Adding a print statement to see the signup_form.errors showed the following ValueError:
ValueError: You have multiple authentication backends configured and therefore must provide the 'backend' argument or set the 'backend' attribute on the user.
This was also shown in the browse (see screenshots).
Looking into the settings.py, AUTHENTICATION_BACKENDS
were added in two places and were therefore conflicting. One of the copies was removed and the form was able to be validated and the user redirected to the success page.
Describe the bug When the signup form is submitted, rather than validating the form and redirecting to the success page, the signup form page is being rendered again.
This is the responsible code:
Using a breakpoint (after
signup_form = UserSignupForm(request.POST)
, the object being returned when the form is submitted is as so:<UserSignupForm bound=True, valid=Unknown, fields=(username;email;password)>
Therefore, theif signup_form.is_valid():
check returns FALSE and theapp_user:signup
page is being rendered.To Reproduce Steps to reproduce the behavior:
Expected behavior The form should be evaluated as valid and the success page (
return redirect(reverse("app_user:success"))
) should be displayed.Screenshots
Desktop (please complete the following information):