Sith/core/templates/core/login.jinja
2016-07-19 19:03:16 +02:00

39 lines
1.0 KiB
Django/Jinja

{% extends "core/base.jinja" %}
{% block content %}
{% if form.errors %}
<p>{% trans %}Your username and password didn't match. Please try again.{% endtrans %}</p>
{% endif %}
{% if next %}
{% if user.is_authenticated() %}
<p>{% trans %}Your account doesn't have access to this page. To proceed,
please login with an account that has access.{% endtrans %}</p>
{% else %}
<p>{% trans %}Please login to see this page.{% endtrans %}</p>
{% endif %}
{% endif %}
<form method="post" action="{{ url('core:login') }}">
{% csrf_token %}
<table>
<tr>
<td>{{ form.username.label_tag() }}</td>
<td>{{ form.username }}</td>
</tr>
<tr>
<td>{{ form.password.label_tag() }}</td>
<td>{{ form.password }}</td>
</tr>
</table>
<input type="submit" value="{% trans %}login{% endtrans %}" />
<input type="hidden" name="next" value="{{ next }}" />
</form>
{# Assumes you setup the password_reset view in your URLconf #}
<p><a href="{{ url('core:password_reset') }}">{% trans %}Lost password?{% endtrans %}</a></p>
{% endblock %}