I am trying to create a registration form using django, when I submit my form the is valid() function fails and I am not sure why. I have my registration and login page all
Right now your form is always empty and therefore invalid. You forgot to add the request POST content to the form.
def SignUp(request):
# ...
if request.method == 'POST':
regForm = SignupForm(request.POST) # form needs content
if regForm.is_valid():
# ...
If you get stuck when calling .is_valid()
, you can print(regForm.errors)
to see what's up.