Fixed #4762 -- Corrected an example. Thanks, Collin Grady and SmileyChris.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5851 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
aca2761faf
commit
1d4a0054e3
|
@ -678,7 +678,7 @@ The easiest way is to iterate over the form's fields, with
|
||||||
<form method="post" action="">
|
<form method="post" action="">
|
||||||
<dl>
|
<dl>
|
||||||
{% for field in form %}
|
{% for field in form %}
|
||||||
<dt>{{ field.label }}</dt>
|
<dt>{{ field.label_tag }}</dt>
|
||||||
<dd>{{ field }}</dd>
|
<dd>{{ field }}</dd>
|
||||||
{% if field.help_text %}<dd>{{ field.help_text }}</dd>{% endif %}
|
{% if field.help_text %}<dd>{{ field.help_text }}</dd>{% endif %}
|
||||||
{% if field.errors %}<dd class="myerrors">{{ field.errors }}</dd>{% endif %}
|
{% if field.errors %}<dd class="myerrors">{{ field.errors }}</dd>{% endif %}
|
||||||
|
@ -698,11 +698,11 @@ For example::
|
||||||
|
|
||||||
<form method="post" action="">
|
<form method="post" action="">
|
||||||
<ul class="myformclass">
|
<ul class="myformclass">
|
||||||
<li>{{ form.sender.label }} {{ form.sender }}</li>
|
<li>{{ form.sender.label_tag }} {{ form.sender }}</li>
|
||||||
<li class="helptext">{{ form.sender.help_text }}</li>
|
<li class="helptext">{{ form.sender.help_text }}</li>
|
||||||
{% if form.sender.errors %}<ul class="errorlist">{{ form.sender.errors }}</ul>{% endif %}
|
{% if form.sender.errors %}<ul class="errorlist">{{ form.sender.errors }}</ul>{% endif %}
|
||||||
|
|
||||||
<li>{{ form.subject.label }} {{ form.subject }}</li>
|
<li>{{ form.subject.label_tag }} {{ form.subject }}</li>
|
||||||
<li class="helptext">{{ form.subject.help_text }}</li>
|
<li class="helptext">{{ form.subject.help_text }}</li>
|
||||||
{% if form.subject.errors %}<ul class="errorlist">{{ form.subject.errors }}</ul>{% endif %}
|
{% if form.subject.errors %}<ul class="errorlist">{{ form.subject.errors }}</ul>{% endif %}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue