Django Validierungsfehler CSS

{%for field in form %}
<div class="control-group {%if field.errors %}error{%endif%}">
{# render your field #}
</div>
{% endfor %}
Annoyed Albatross