{% if formset.non_form_errors %} <div class="alert alert-block alert-danger"> {% if formset_error_title %}<h4 class="alert-heading">{{ formset_error_title }}</h4>{% endif %} <ul> {{ formset.non_form_errors|unordered_list }} </ul> </div> {% endif %}