diff -Naur ../Django-1.1-orig/django/contrib/auth/forms.py ./django/contrib/auth/forms.py
|
old
|
new
|
|
| 11 | 11 | """ |
| 12 | 12 | A form that creates a user, with no privileges, from the given username and password. |
| 13 | 13 | """ |
| 14 | | username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^\w+$', |
| 15 | | help_text = _("Required. 30 characters or fewer. Alphanumeric characters only (letters, digits and underscores)."), |
| 16 | | error_message = _("This value must contain only letters, numbers and underscores.")) |
| | 14 | username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$', |
| | 15 | help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."), |
| | 16 | error_message = _("This value may contain only letters, numbers and @/./+/-/_ characters.")) |
| 17 | 17 | password1 = forms.CharField(label=_("Password"), widget=forms.PasswordInput) |
| 18 | 18 | password2 = forms.CharField(label=_("Password confirmation"), widget=forms.PasswordInput) |
| 19 | 19 | |
| … |
… |
|
| 44 | 44 | return user |
| 45 | 45 | |
| 46 | 46 | class UserChangeForm(forms.ModelForm): |
| 47 | | username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^\w+$', |
| 48 | | help_text = _("Required. 30 characters or fewer. Alphanumeric characters only (letters, digits and underscores)."), |
| 49 | | error_message = _("This value must contain only letters, numbers and underscores.")) |
| | 47 | username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$', |
| | 48 | help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."), |
| | 49 | error_message = _("This value may contain only letters, numbers and @/./+/-/_ characters.")) |
| 50 | 50 | |
| 51 | 51 | class Meta: |
| 52 | 52 | model = User |