Browse files

Fixed #19700 - Added documentation for BoundField.field.

Thanks Tiberiu Ana for the report and patch.
  • Loading branch information...
timgraham committed Feb 2, 2013
1 parent a1c470a commit fdaaa241715ece2f706041faf16fb282e2782593
Showing with 7 additions and 1 deletion.
  1. +7 −1 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
``{{ 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

0 comments on commit fdaaa24

Please sign in to comment.