Authentication: show errors for username / password login failures
This commit is contained in:
parent
7477adec05
commit
8f5b59604e
1 changed files with 8 additions and 0 deletions
|
@ -4,6 +4,14 @@
|
||||||
<h5>{% trans "Please log in with your account" %}</h5>
|
<h5>{% trans "Please log in with your account" %}</h5>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
{% if form.non_field_errors %}
|
||||||
|
<ul class='form-errors'>
|
||||||
|
{% for error in form.non_field_errors %}
|
||||||
|
<li>{{ error }}</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<form id='login_form' action="{% url 'login' %}" method="POST">
|
<form id='login_form' action="{% url 'login' %}" method="POST">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<input type="text" name="username" placeholder="{% trans 'Username' %}" autofocus />
|
<input type="text" name="username" placeholder="{% trans 'Username' %}" autofocus />
|
||||||
|
|
Loading…
Reference in a new issue