mark a required field by "*" in a template

1
2
3
4
5
6
7
8
9
{% for field in form %}
    <div>
        <label for="{{ field.label }}">{{ field.label_tag }}
        {% if field.field.required %}<span class="special_class">*</span>{% endif %}</label>

        {{ field }}
    </div>

{% endfor %}

Comments

(Forgotten your password?)

You may use Markdown syntax here, but raw HTML will be removed.