blob: 9e00087113095770253b7bec9559aaa4f2ff5ae9 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
{% extends "core/base.html" %}
{% block content %}
<div class="w3-container">
{% if form.errors %}
<p>Your username and password didn't match. Please try again.</p>
{% endif %}
{% if next %}
{% if user.is_authenticated %}
<p>Your account doesn't have access to this page. To proceed,
please login with an account that has access.</p>
{% else %}
<p>Please login to see this page.</p>
{% endif %}
{% endif %}
<form method="post" action="{% url 'login' %}">
{% csrf_token %}
<div class="form-group">
{{ form.username.label_tag }}
{{ form.username }}
</div>
<div class="form-group">
{{ form.password.label_tag }}
{{ form.password }}
</div>
<div class="form-group">
<button type="submit" class="btn btn-primary" value="login">Log In</button>
</div>
<input type="hidden" name="next" value="{{ next }}">
</form>
<div class="form-group">
{# Assumes you set up the password_reset view in your URLconf #}
<a href="{% url 'password_reset' %}">Lost password?</a>
</div>
{% endblock content %}
</div>
|