summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorGabriel Muñumel <gabrielmunumel@gmail.com>2014-08-06 22:26:23 -0430
committerTim Graham <timograham@gmail.com>2014-08-15 08:14:45 -0400
commitdeed00c0d803d324a3dfdeba52458b6b009c1a90 (patch)
tree3026981d579f569d4c7bcdf1855a8b32dff98e57 /docs/ref
parent99561eef26b75947891929a2b7d5b2c605aa2456 (diff)
Fixed #23162 -- Renamed forms.Field._has_changed() to has_changed().
Diffstat (limited to 'docs/ref')
-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