Ragnyll / FridgeFiller

Our Project For CS 4096
1 stars 1 forks source link

Login / Signup need to display form errors #27

Closed jonsimington closed 8 years ago

jonsimington commented 8 years ago

since we are using django-allauth, we can take advantage of form.errors

place this somewhere in the form (I usually place it in the same form-group as the password:

{% if form.errors %}
    {% for field in form %}
        {% for error in field.errors %}
            <div class="alert alert-danger">
                <strong>{{ error|escape }}</strong>
            </div>
        {% endfor %}
    {% endfor %}
    {% for error in form.non_field_errors %}
        <div class="alert alert-danger">
            <strong>{{ error|escape }}</strong>
        </div>
    {% endfor %}
{% endif %}

Anyone less familiar with Django / HTML want to tackle this one?

jonsimington commented 8 years ago

bc8fe9b9d827f6cf62d75a2d8c42df06006f00ba