diff options
| author | Claude Paroz <claude@2xlibre.net> | 2015-07-07 21:06:57 +0200 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2015-07-16 19:36:56 +0200 |
| commit | 1ef4aeab403f7fb74c0b9b11fde854fd03afc40c (patch) | |
| tree | b3852ad0aefffcf4fd29aacc19e1ca9529d9cdb9 /docs | |
| parent | 1fed8dd715cc734f51c162d4362d34d357925bc4 (diff) | |
Fixed #25078 -- Added support for disabled form fields
Thanks Keryn Knight and Tim Graham for the reviews.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/forms/fields.txt | 11 | ||||
| -rw-r--r-- | docs/releases/1.9.txt | 3 |
2 files changed, 14 insertions, 0 deletions
diff --git a/docs/ref/forms/fields.txt b/docs/ref/forms/fields.txt index c4a40021d0..776ef873ad 100644 --- a/docs/ref/forms/fields.txt +++ b/docs/ref/forms/fields.txt @@ -299,6 +299,17 @@ as the rendered output. See the :ref:`format localization <format-localization>` documentation for more information. +``disabled`` +~~~~~~~~~~~~ + +.. attribute:: Field.disabled + +.. versionadded:: 1.9 + +The ``disabled`` boolean argument, when set to ``True``, disables a form field +using the ``disabled`` HTML attribute so that it won't be editable by users. +Even if a user tampers with the field's value submitted to the server, it will +be ignored in favor of the value from the form's initial data. Checking if the field data has changed -------------------------------------- diff --git a/docs/releases/1.9.txt b/docs/releases/1.9.txt index 783009db07..6dc0e8473f 100644 --- a/docs/releases/1.9.txt +++ b/docs/releases/1.9.txt @@ -313,6 +313,9 @@ Forms and trailing whitespace. As this defaults to ``True`` this is different behavior from previous releases. +* Form fields now support the :attr:`~django.forms.Field.disabled` argument, + allowing the field widget to be displayed disabled by browsers. + Generic Views ^^^^^^^^^^^^^ |
