summaryrefslogtreecommitdiff
path: root/docs/releases
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2012-08-04 14:17:02 +0200
committerClaude Paroz <claude@2xlibre.net>2012-08-04 14:22:23 +0200
commit121fd109de09ece4e263e508f9034df9b583da46 (patch)
tree7f6c7399b2f2b8f4b0942a79726faae40f41f3ec /docs/releases
parent10f979fd92000de1ac9713351f5cb749e2cbca03 (diff)
Fixed #5524 -- Do not remove cleaned_data when a form fails validation
cleaned_data is no longer deleted when form validation fails but only contains the data that did validate. Thanks to the various contributors to this patch (see ticket).
Diffstat (limited to 'docs/releases')
-rw-r--r--docs/releases/1.5.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/docs/releases/1.5.txt b/docs/releases/1.5.txt
index 968d63e1f3..3a9b2d859a 100644
--- a/docs/releases/1.5.txt
+++ b/docs/releases/1.5.txt
@@ -239,6 +239,16 @@ database state behind or unit tests that rely on some form of state being
preserved after the execution of other tests. Such tests are already very
fragile, and must now be changed to be able to run independently.
+`cleaned_data` dictionary kept for invalid forms
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The :attr:`~django.forms.Form.cleaned_data` dictionary is now always present
+after form validation. When the form doesn't validate, it contains only the
+fields that passed validation. You should test the success of the validation
+with the :meth:`~django.forms.Form.is_valid()` method and not with the
+presence or absence of the :attr:`~django.forms.Form.cleaned_data` attribute
+on the form.
+
Miscellaneous
~~~~~~~~~~~~~