Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed #19130 -- Made some of the auth forms more flexible for user mo…

…dels.
  • Loading branch information...
commit bfcda7781a886ab2b7b41937c0f49c088f58a3d7 1 parent 8f94d28
@freakboy3742 freakboy3742 authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 django/contrib/auth/forms.py
View
4 django/contrib/auth/forms.py
@@ -136,7 +136,7 @@ class AuthenticationForm(forms.Form):
Base class for authenticating users. Extend this to get a form that accepts
username/password logins.
"""
- username = forms.CharField(max_length=30)
+ username = forms.CharField(max_length=254)
@claudep Collaborator
claudep added a note

in __init__, we already get the username field to set the label, what about to also set the max_length from the real username field?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
password = forms.CharField(label=_("Password"), widget=forms.PasswordInput)
error_messages = {
@@ -198,7 +198,7 @@ class PasswordResetForm(forms.Form):
'unusable': _("The user account associated with this email "
"address cannot reset the password."),
}
- email = forms.EmailField(label=_("Email"), max_length=75)
+ email = forms.EmailField(label=_("Email"), max_length=254)
def clean_email(self):
"""
Please sign in to comment.
Something went wrong with that request. Please try again.