#12520: django.contrib.auth.forms.UserCreationForm.clean doesn't return
cleaned_data dictionary
-------------------+--------------------------------------------------------
Reporter: phxx | Owner: nobody
Status: new | Milestone:
Component: Forms | Version: SVN
Keywords: | Stage: Unreviewed
Has_patch: 0 |
-------------------+--------------------------------------------------------
The clean() method of django.contrib.auth.forms.UserCreationForm looks
like this (trunk version)
{{{
def clean(self):
# Fill the password field so model validation won't complain about
it
# being blank. We'll set it with the real value below.
self.instance.password = UNUSABLE_PASSWORD
super(UserCreationForm, self).clean()
}}}
It is missing a return statement that returns the cleaned_data dictionary.
Because of that the form.cleaned_data attribute will be None after
validating the form.
I think this behaviour is not intended -- athorwise there would be a
comment.
--
Ticket URL: <
http://code.djangoproject.com/ticket/12520>
Django <
http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.