Show non field errors in base form template
authorMagnus Hagander <magnus@hagander.net>
Fri, 21 Nov 2025 09:07:32 +0000 (10:07 +0100)
committerMagnus Hagander <magnus@hagander.net>
Wed, 26 Nov 2025 11:09:43 +0000 (12:09 +0100)
templates/base/form_contents.html

index 3d110c72ffa2aadd8abfec2a18ff50d4e8426245..9a00c216afa36e5adc1328f9a617b4d091cc9745 100644 (file)
@@ -5,6 +5,9 @@
       Please correct the errors below, and re-submit the form.
     </div>
   {%endif%}
+{%for e in form.non_field_errors %}
+    <div class="alert alert-danger">{{e}}</div>
+{%endfor%}
 {%if form.fieldsets%}
 {%for fieldset in form.fieldsets%}
 <fieldset id="{{fieldset.id}}" class="form-group">