From ea259e8bde2d4ea6b018f28900288a71ab2db05a Mon Sep 17 00:00:00 2001 From: Cezar Pendarovski Date: Thu, 4 Sep 2014 16:01:27 +0200 Subject: [PATCH] Error messages are displayed below the input fields --- .../templates/rest_framework/login_base.html | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/rest_framework/templates/rest_framework/login_base.html b/rest_framework/templates/rest_framework/login_base.html index 75e6d4727..3a75e8b35 100644 --- a/rest_framework/templates/rest_framework/login_base.html +++ b/rest_framework/templates/rest_framework/login_base.html @@ -18,38 +18,38 @@
- {% if form.non_field_errors %} - {% for error in form.non_field_errors %} -

{{ error }}

- {% endfor %} - {% endif %} {% csrf_token %}
+ + {% if form.username.errors %} -

+

{{ form.username.errors|striptags }}

{% endif %} - -
+ + {% if form.password.errors %} -

+

{{ form.password.errors|striptags }}

{% endif %} - -
+ {% if form.non_field_errors %} + {% for error in form.non_field_errors %} +
{{ error }}
+ {% endfor %} + {% endif %}