On Jan 7, 4:36 am, Sandman <sandman10...@gmail.com> wrote:
> Hi All,
>
> Happy new year.
>
> I've been using the svn version of django while developing a small app.
> Yesterday after I updated the code, one of my tests started returning an
> error. In fixing this error, I may have uncovered a bug but I can't be
> sure if this is intentional behavior (I'm not really an experienced dev,
> so no confidence :().
>
> Anyway, I have a UserCreationForm that inherits from
> django.contrib.auth.forms.UserCreationForm (Code attached). In the
> recent change to django code, a "clean" method was added to Contrib's
> UserCreationForm. This method does not return any value. I think it is
> supposed to return self.cleaned_data
>
> When my form (that delegates clean to super) tries to use cleaned_data
> in the save(), an exception is raised since self.cleaned_data end up
> being None.
>
> I have fixed the problem by adding a clean method in my form code that
> delegates to "clean" of the ancestor of Contrib's UserCreationForm. But
> it would be nice to simply inherit the form from contrib.auth and not
> have to worry about the clean method.
>
> What do you think?
>
> Take care,
> Rajiv.
>
>  forms.py
> 2KViewDownload

Yes, this is a bug. It's already been raised in the issue tracker
(#12520).

I must say that it's probably a bad idea to be developing against
trunk at the moment. It's in quite a lot of flux as we approach 1.2,
so unless you desperately need the latest features, I'd stay on 1.1
for now.
--
DR.
-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.


Reply via email to