Corrected length mismatch between registration form and database for username field

This commit is contained in:
Adarnof 2015-11-06 03:41:57 +00:00
parent 4134bbb188
commit 3e550105a1

View File

@ -3,7 +3,7 @@ from django.contrib.auth.models import User
class RegistrationForm(forms.Form): class RegistrationForm(forms.Form):
username = forms.CharField(max_length=32, required=True) username = forms.CharField(max_length=30, required=True)
password = forms.CharField(widget=forms.PasswordInput(), required=True) password = forms.CharField(widget=forms.PasswordInput(), required=True)
password_again = forms.CharField(widget=forms.PasswordInput(), required=True, label="Password Again") password_again = forms.CharField(widget=forms.PasswordInput(), required=True, label="Password Again")
email = forms.CharField(max_length=254, required=True) email = forms.CharField(max_length=254, required=True)
@ -28,4 +28,4 @@ class RegistrationForm(forms.Form):
if self.cleaned_data['email'] != self.cleaned_data['email_again']: if self.cleaned_data['email'] != self.cleaned_data['email_again']:
raise forms.ValidationError(u'Emails do not match') raise forms.ValidationError(u'Emails do not match')
return self.cleaned_data return self.cleaned_data