summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorSimon Willison <simon@simonwillison.net>2008-09-15 00:13:25 +0000
committerSimon Willison <simon@simonwillison.net>2008-09-15 00:13:25 +0000
commit6fcdcbd456cc2eb832e956414eccb993216f44ab (patch)
tree5fd1114d27a70c84df2f1023c5117af43a50a277 /docs
parent5389c0d2afebcee36bdef23a61788eef29374e78 (diff)
Clarified the wording of the section on customizing form.errors within a field loop
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9032 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
-rw-r--r--docs/topics/forms/index.txt16
1 files changed, 9 insertions, 7 deletions
diff --git a/docs/topics/forms/index.txt b/docs/topics/forms/index.txt
index a8ae0ef922..cf6b933ee4 100644
--- a/docs/topics/forms/index.txt
+++ b/docs/topics/forms/index.txt
@@ -267,12 +267,9 @@ reduce duplicate code by looping through each field in turn using
<p><input type="submit" value="Send message"></p>
</form>
-As in the above example, {{ field.errors }} will output a
-``<ul class="errorlist">`` by default. You can further customise the display
-of errors with a ``{% for error in field.errors %}`` loop.
-
-Within this loop, ``{{ field }}`` is an instance of BoundField. BoundField
-also has the following attributes which can be useful in your templates:
+Within this loop, ``{{ field }}`` is an instance of :class:`BoundField`.
+``BoundField`` also has the following attributes which can be useful in your
+templates:
``{{ field.label }}``
The label of the field, e.g. ``Name``.
@@ -285,9 +282,14 @@ also has the following attributes which can be useful in your templates:
The name of the field that will be used in the input element's name
field; this takes the form prefix in to account if it has been set.
- ``{{ field.help_text}}``
+ ``{{ field.help_text }}``
Any help text that has been associated with the field.
+ ``{{ field.errors }}``
+ Outputs a ``<ul class="errorlist">`` containing any validation errors
+ corresponding to this field. You can customize the presentation of
+ the errors with a ``{% for error in field.errors %}`` loop.
+
Further topics
==============