Django

Code

Changeset 9032

Show
Ignore:
Timestamp:
09/14/08 19:13:25 (4 months ago)
Author:
simon
Message:

Clarified the wording of the section on customizing form.errors within a field loop

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/docs/topics/forms/index.txt

    r9030 r9032  
    268268    </form> 
    269269 
    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: 
     270Within this loop, ``{{ field }}`` is an instance of :class:`BoundField`. 
     271``BoundField`` also has the following attributes which can be useful in your  
     272templates: 
    276273 
    277274    ``{{ field.label }}`` 
     
    286283        field; this takes the form prefix in to account if it has been set. 
    287284     
    288     ``{{ field.help_text}}`` 
     285    ``{{ field.help_text }}`` 
    289286        Any help text that has been associated with the field. 
    290287     
     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 
    291293Further topics 
    292294==============