I have added a custom backend to allow a user to log in with a username or email in addition to password. It works fine except when the email is longer than 30 characters. The form error I get is:
"Ensure this value has at most 30 characters (it has 35)."
In one my my apps' urls.py file I've overridden the max_length of the username field like this:
from django.contrib.auth.forms import AuthenticationForm
AuthenticationForm.base_fields['username'].max_length = 75
I've even tried the class_prepared signal technique described here:
http://stackoverflow.com/questions/2610088/can-djangos-auth-user-username-be-varchar75-how-could-that-be-done/2613385#2613385
I'm not sure where I'm going wrong here and I appreciate the help.