Commits

Chris Moffitt committed 7ecf86b

Fix email authentication with 75 char usernames. Close #1342

Comments (0)

Files changed (1)

satchmo/apps/satchmo_store/accounts/forms.py

 
 class EmailAuthenticationForm(AuthenticationForm):
     """Authentication form with a longer username field."""
-
-    def __init__(self, *args, **kwargs):
-
-        super(EmailAuthenticationForm, self).__init__(*args, **kwargs)
-        username = self.fields['username']
-        username.max_length = 75
-        username.widget.attrs['maxlength'] = 75
+    username = forms.CharField(label=_("Username"), max_length=75)
 
 class RegistrationForm(forms.Form):
     """The basic account registration form."""