Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Clarified the wording of the section on customizing form.errors withi…

…n a field loop

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9032 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 6fcdcbd456cc2eb832e956414eccb993216f44ab 1 parent 5389c0d
authored September 15, 2008

Showing 1 changed file with 9 additions and 7 deletions. Show diff stats Hide diff stats

  1. 16  docs/topics/forms/index.txt
16  docs/topics/forms/index.txt
@@ -267,12 +267,9 @@ reduce duplicate code by looping through each field in turn using
267 267
         <p><input type="submit" value="Send message"></p>
268 268
     </form>
269 269
 
270  
-As in the above example, {{ field.errors }} will output a 
271  
-``<ul class="errorlist">`` by default. You can further customise the display
272  
-of errors with a ``{% for error in field.errors %}`` loop.
273  
-
274  
-Within this loop, ``{{ field }}`` is an instance of BoundField. BoundField 
275  
-also has the following attributes which can be useful in your templates:
  270
+Within this loop, ``{{ field }}`` is an instance of :class:`BoundField`.
  271
+``BoundField`` also has the following attributes which can be useful in your 
  272
+templates:
276 273
 
277 274
     ``{{ field.label }}``
278 275
         The label of the field, e.g. ``Name``.
@@ -285,9 +282,14 @@ also has the following attributes which can be useful in your templates:
285 282
         The name of the field that will be used in the input element's name 
286 283
         field; this takes the form prefix in to account if it has been set.
287 284
     
288  
-    ``{{ field.help_text}}``
  285
+    ``{{ field.help_text }}``
289 286
         Any help text that has been associated with the field.
290 287
     
  288
+    ``{{ field.errors }}``
  289
+        Outputs a ``<ul class="errorlist">`` containing any validation errors
  290
+        corresponding to this field. You can customize the presentation of 
  291
+        the errors with a ``{% for error in field.errors %}`` loop.
  292
+
291 293
 Further topics
292 294
 ==============
293 295
 

0 notes on commit 6fcdcbd

Please sign in to comment.
Something went wrong with that request. Please try again.