Django, loop over all form errors
django, django-forms
Solution
Form errors in Django are implemented as an `ErrorDict` instance (which is just a subclass of `dict` with extras). Try a slight adjustment to your template for loop syntax:
{% for key, value in form.errors.items %}
Problem
At my template, I want to iterate through all form errors, including the ones that are NOT belonging to a specific field. ( which means for form.errors, it should also display for `__all__` errors aswell) I have tried several versions, Ie: ``` <div id="msg"> {% if form.errors %} <div class="error"> <p><span>ERROR</span></p> <ul> {% for key,value in form.errors %} {% for error in value %} <li>{{ error }}</li> {% endfor %} {% endfor %} </ul> </div> {% endif %} </div> ``` Still no achievement, I will be greatful for any suggestion.