#12960: return value (cleaned_data) from clean() method is ignored -------------------------------+-------------------------------------------- Reporter: krejcik | Owner: nobody Status: reopened | Milestone: 1.2 Component: Forms | Version: SVN Resolution: | Keywords: Stage: Accepted | Has_patch: 0 Needs_docs: 0 | Needs_tests: 0 Needs_better_patch: 0 | -------------------------------+-------------------------------------------- Comment (by SmileyChris):
Here's a quick review the current situation: * clean form fields * clean model fields * clean model * clean form The model is cleaned before the form so the model's clean method gets a chance to fix fields before the form's validate_unique method is run. This puts us into a cyclic problem in where we need to check the model instance before actually being able to clean the form, which may alter the form's cleaned_data. But we need the cleaned_data to accurately build the instance. And we also aren't allowed to call model field's save_form_data more than once (according to other tests). -- Ticket URL: <http://code.djangoproject.com/ticket/12960#comment:3> Django <http://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-upda...@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.