Ticket #16709: username_of_128chars.diff
File username_of_128chars.diff, 2.7 KB (added by , 13 years ago) |
---|
-
models.py
181 181 182 182 Username and password are required. Other fields are optional. 183 183 """ 184 username = models.CharField(_('username'), max_length= 30, unique=True, help_text=_("Required. 30characters or fewer. Letters, numbers and @/./+/-/_ characters"))184 username = models.CharField(_('username'), max_length=128, unique=True, help_text=_("Required. 128 characters or fewer. Letters, numbers and @/./+/-/_ characters")) 185 185 first_name = models.CharField(_('first name'), max_length=30, blank=True) 186 186 last_name = models.CharField(_('last name'), max_length=30, blank=True) 187 187 email = models.EmailField(_('e-mail address'), blank=True) -
forms.py
15 15 """ 16 16 A form that creates a user, with no privileges, from the given username and password. 17 17 """ 18 username = forms.RegexField(label=_("Username"), max_length= 30, regex=r'^[\w.@+-]+$',19 help_text = _("Required. 30characters or fewer. Letters, digits and @/./+/-/_ only."),18 username = forms.RegexField(label=_("Username"), max_length=128, regex=r'^[\w.@+-]+$', 19 help_text = _("Required. 128 characters or fewer. Letters, digits and @/./+/-/_ only."), 20 20 error_messages = {'invalid': _("This value may contain only letters, numbers and @/./+/-/_ characters.")}) 21 21 password1 = forms.CharField(label=_("Password"), widget=forms.PasswordInput) 22 22 password2 = forms.CharField(label=_("Password confirmation"), widget=forms.PasswordInput, … … 49 49 return user 50 50 51 51 class UserChangeForm(forms.ModelForm): 52 username = forms.RegexField(label=_("Username"), max_length= 30, regex=r'^[\w.@+-]+$',53 help_text = _("Required. 30characters or fewer. Letters, digits and @/./+/-/_ only."),52 username = forms.RegexField(label=_("Username"), max_length=128, regex=r'^[\w.@+-]+$', 53 help_text = _("Required. 128 characters or fewer. Letters, digits and @/./+/-/_ only."), 54 54 error_messages = {'invalid': _("This value may contain only letters, numbers and @/./+/-/_ characters.")}) 55 55 56 56 class Meta: … … 67 67 Base class for authenticating users. Extend this to get a form that accepts 68 68 username/password logins. 69 69 """ 70 username = forms.CharField(label=_("Username"), max_length= 30)70 username = forms.CharField(label=_("Username"), max_length=128) 71 71 password = forms.CharField(label=_("Password"), widget=forms.PasswordInput) 72 72 73 73 def __init__(self, request=None, *args, **kwargs):