summaryrefslogtreecommitdiff
path: root/docs/ref/forms
diff options
context:
space:
mode:
Diffstat (limited to 'docs/ref/forms')
-rw-r--r--docs/ref/forms/api.txt4
-rw-r--r--docs/ref/forms/fields.txt18
2 files changed, 21 insertions, 1 deletions
diff --git a/docs/ref/forms/api.txt b/docs/ref/forms/api.txt
index da8e8a92f1..deb974ad5d 100644
--- a/docs/ref/forms/api.txt
+++ b/docs/ref/forms/api.txt
@@ -279,7 +279,9 @@ so that the comparison can be done:
>>> f.has_changed()
``has_changed()`` will be ``True`` if the data from ``request.POST`` differs
-from what was provided in :attr:`~Form.initial` or ``False`` otherwise.
+from what was provided in :attr:`~Form.initial` or ``False`` otherwise. The
+result is computed by calling :meth:`Field.has_changed` for each field in the
+form.
Accessing the fields from the form
----------------------------------
diff --git a/docs/ref/forms/fields.txt b/docs/ref/forms/fields.txt
index 3fbbac9624..1d8a1c9b5d 100644
--- a/docs/ref/forms/fields.txt
+++ b/docs/ref/forms/fields.txt
@@ -299,6 +299,24 @@ as the rendered output.
See the :ref:`format localization <format-localization>` documentation for
more information.
+
+Checking if the field data has changed
+--------------------------------------
+
+``has_changed()``
+~~~~~~~~~~~~~~~~~~
+
+.. method:: Field.has_changed()
+
+.. versionchanged:: 1.8
+
+ This method was renamed from ``_has_changed()``.
+
+The ``has_changed()`` method is used to determine if the field value has changed
+from the initial value. Returns ``True`` or ``False``.
+
+See the :class:`Form.has_changed()` documentation for more information.
+
.. _built-in-fields:
Built-in ``Field`` classes