tags:

views:

48

answers:

1

Hi,

Is there a direct way of listing out 'all' form errors in Django templates. I'd like to list out both field and non-field errors and any other form errors.

I've found out how to do this on a per-field basis but as said earlier, I'd like to list out everything.

The method I'm using doesn't seem to list out everything.

{% for error in form.errors %}
{{ error|escape }}
{% endfor %}

Thanks.

+3  A: 

You could loop over all the field in addition to non-field errors:

The MYYN