From 410c4596dfd5791435bfb8fd73a5fb5a48dd8b47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Sureau?= Date: Fri, 5 Aug 2011 16:42:43 +0200 Subject: [PATCH] Error display changed. --- budget/templates/display_errors.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/budget/templates/display_errors.html b/budget/templates/display_errors.html index 15039a2..bc65a3a 100644 --- a/budget/templates/display_errors.html +++ b/budget/templates/display_errors.html @@ -1,5 +1,5 @@ -{% for errors in form.errors.values() %} - {% for error in errors %} -

{{error}}

+{% for field_name, field_errors in form.errors.items() if field_errors %} + {% for error in field_errors %} +

{{ form[field_name].label.text }}: {{ error }}

{% endfor %} {% endfor %}