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 %}