summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2013-02-02 08:34:42 -0500
committerTim Graham <timograham@gmail.com>2013-02-02 08:34:42 -0500
commitfdaaa241715ece2f706041faf16fb282e2782593 (patch)
treea74e1bc93e517ebe65d6a96f7371074df7454149 /docs
parenta1c470a6f6084ee3d803d884b62df61ab6f5c5df (diff)
Fixed #19700 - Added documentation for BoundField.field.
Thanks Tiberiu Ana for the report and patch.
Diffstat (limited to 'docs')
-rw-r--r--docs/topics/forms/index.txt8
1 files changed, 7 insertions, 1 deletions
diff --git a/docs/topics/forms/index.txt b/docs/topics/forms/index.txt
index 78f51f3fcc..ac58acc9e3 100644
--- a/docs/topics/forms/index.txt
+++ b/docs/topics/forms/index.txt
@@ -336,7 +336,7 @@ attributes, which can be useful in your templates:
case, each object in the loop is a simple string containing the error
message.
-``field.is_hidden``
+``{{ field.is_hidden }}``
This attribute is ``True`` if the form field is a hidden field and
``False`` otherwise. It's not particularly useful as a template
variable, but could be useful in conditional tests such as::
@@ -345,6 +345,12 @@ attributes, which can be useful in your templates:
{# Do something special #}
{% endif %}
+``{{ field.field }}``
+ The :class:`~django.forms.Field` instance from the form class that
+ this :class:`~django.forms.BoundField` wraps. You can use it to access
+ :class:`~django.forms.Field` attributes , e.g.
+ ``{{ char_field.field.max_length }}``.
+
Looping over hidden and visible fields
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~