diff --git a/django/contrib/auth/forms.py b/django/contrib/auth/forms.py
index dbc55ca..038fea8 100644
|
a
|
b
|
class UserCreationForm(forms.ModelForm):
|
| 21 | 21 | model = User |
| 22 | 22 | fields = ("username",) |
| 23 | 23 | |
| 24 | | def clean(self): |
| | 24 | def __init__(self, *args, **kwargs): |
| 25 | 25 | # Fill the password field so model validation won't complain about it |
| 26 | 26 | # being blank. We'll set it with the real value below. |
| | 27 | super(UserCreationForm, self).__init__(*args, **kwargs) |
| 27 | 28 | self.instance.password = UNUSABLE_PASSWORD |
| 28 | | super(UserCreationForm, self).clean() |
| 29 | 29 | |
| 30 | 30 | def clean_username(self): |
| 31 | 31 | username = self.cleaned_data["username"] |