Added non_field.errors in form.html.

This commit is contained in:
Emanuel Schuetze 2013-05-16 23:29:01 +02:00
parent bf58f2a6cc
commit eedc79ca8f
2 changed files with 9 additions and 1 deletions

View File

@ -24,7 +24,6 @@
</h1>
<form action="" method="post">{% csrf_token %}
{{ form.non_field_errors }}
{% include "form.html" %}
{% if edit_user %}
<p style="margin: -15px 0 25px 0;">

View File

@ -1,3 +1,12 @@
{% if form.non_field_errors %}
<div class="alert alert-error">
<button type="button" class="close" data-dismiss="alert">&times;</button>
{% for msg in form.non_field_errors %}
{{ msg }}
{% if not forloop.last %}<br />{% endif %}
{% endfor %}
</div>
{% endif %}
{% for field in form %}
<div class="control-group {% if field.errors %}error{% endif%}">
<label for="id_{{ field.name }}">{{ field.label }}{% if field.field.required %}<span class="required">*</span>{% endif %}:</label>