Ticket #12552: 12552.diff

File 12552.diff, 744 bytes (added by Honza Král, 15 years ago)
  • django/contrib/auth/forms.py

    diff --git a/django/contrib/auth/forms.py b/django/contrib/auth/forms.py
    index dbc55ca..038fea8 100644
    a b class UserCreationForm(forms.ModelForm):  
    2121        model = User
    2222        fields = ("username",)
    2323
    24     def clean(self):
     24    def __init__(self, *args, **kwargs):
    2525        # Fill the password field so model validation won't complain about it
    2626        # being blank. We'll set it with the real value below.
     27        super(UserCreationForm, self).__init__(*args, **kwargs)
    2728        self.instance.password = UNUSABLE_PASSWORD
    28         super(UserCreationForm, self).clean()
    2929
    3030    def clean_username(self):
    3131        username = self.cleaned_data["username"]
Back to Top