See http://www.djangoproject.com/documentation/newforms/#accessing-clean-data,
check the 'Note' section.

This was a problem in the old newforms where you couldn't have a field
called 'data' due to the clean_<fieldname> functions clashing with the
clean_data dictionary.

Also see:
http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#Newforms:clean_datachangedtocleaned_data


On Apr 30, 7:39 pm, msoulier <[EMAIL PROTECTED]> wrote:
> A coworker of mine created a form with a field called "data".
>
> ie. data = forms.CharField()
>
> This resulted in an exception being thrown when is_valid() was called
> on the form:
>
> form error - 'dict' is not callable
>
> The exception occurs at line 180 in
>    <python install>\lib\site-packages\django\newforms\forms.py
>
> in Django 0.96.
>
> The reason is that the hasattr() call for "clean_data" returns true.
>
> We're just considering "data" as a reserved word in newforms now, but
> I wanted to check to see if this was known. If so, I'd expect an error
> saying so, instead of the cryptic one that we received.
>
> Thanks,
> Miker
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to