Closed daniyalzade closed 9 years ago
The suggested change in urls.py doesn't fix the admin login validation for me (1.4.10), so I added this monkey patch in forms.py:
auth_forms.AuthenticationForm.base_fields['username'].max_length = MAX_USERNAME_LENGTH() auth_forms.AuthenticationForm.base_fields['username'].widget.attrs['maxlength'] = MAX_USERNAME_LENGTH() # html auth_forms.AuthenticationForm.base_fields['username'].validators[0].limit_value = MAX_USERNAME_LENGTH()
I'm sure there's a better way.
Closing this up, since the supported solution is to use the more maintained fork https://github.com/madssj/django-longer-username-and-email, or Django 1.5+'s custom user models.
Thanks! -Steven
It looks like the validators are not updated. Is that the case, or am I doing something wrong?