List all errors in a form +bootstrap highlighting

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
{% if form.errors %}
	<div class="alert alert-error">
		<button type="button" class="close" data-dismiss="alert">×</button>
		{% for field in form %} 
			{% if field.errors %}
			<li>{{ field.label }}: {{ field.errors|striptags }}</li>
			{% endif %}
		{% endfor %}
	</div>
{% endif %}

More like this

  1. Take a django.core.mail email message and replace any MEDIA_URL-served images with attached images by agrossman@gmail.com 1 year, 3 months ago
  2. Add delete buttons to admin changelist by kylefox 5 years, 12 months ago
  3. Javascript constraints in admin app and fieldsets to tabs (jquery) by jpic 4 years, 2 months ago
  4. Bootstrap button dropdown widget (replaces forms.Select) by benjaoming 9 months, 3 weeks ago
  5. boostrap prepend-input for widgets by DimmuR 7 months, 3 weeks ago

Comments

(Forgotten your password?)