<span class="help-block">{{ form.non_field_errors }}</span>

{% for field in form %}
<div class="control-group {% for error in field.errors %}error{% endfor %}">
    {% if field.is_hidden %}
        {{ field }}
    {% else %}
        <label for="{{ field.auto_id }}" class="control-label {% if field.field.required %}required{% endif %}">{{ field.label }}{% if field.field.required %} <span>*</span>{% endif %}</label>
        <div class="controls">
            {{ field }}
            {% for error in field.errors %}
                <span class="help-block">
                    {{ error|escape }}
                </span>
            {% endfor %}
            {% if field.help_text %}
                <span class='help-block'>
                    {{ field.help_text }}
                </span>
            {% endif %}
        </div>
    {% endif %}
</div>
{% endfor %}
