]>
Commit | Line | Data |
---|---|---|
1 | {% extends "base_generic.html" %} | |
2 | ||
3 | {% block content %} | |
4 | ||
5 | {% if form.errors %} | |
6 | <p>Your username and password didn't match. Please try again.</p> | |
7 | {% endif %} | |
8 | ||
9 | {% if next %} | |
10 | {% if user.is_authenticated %} | |
11 | <p>Your account doesn't have access to this page. To proceed, | |
12 | please login with an account that has access.</p> | |
13 | {% else %} | |
14 | <p>Please login to see this page.</p> | |
15 | {% endif %} | |
16 | {% endif %} | |
17 | ||
18 | <form method="post" action="{% url 'login' %}"> | |
19 | {% csrf_token %} | |
20 | ||
21 | <div> | |
22 | <td>{{ form.username.label_tag }}</td> | |
23 | <td>{{ form.username }}</td> | |
24 | </div> | |
25 | <div> | |
26 | <td>{{ form.password.label_tag }}</td> | |
27 | <td>{{ form.password }}</td> | |
28 | </div> | |
29 | ||
30 | <div> | |
31 | <input type="submit" value="login" /> | |
32 | <input type="hidden" name="next" value="{{ next }}" /> | |
33 | </div> | |
34 | </form> | |
35 | ||
36 | {# Assumes you setup the password_reset view in your URLconf #} | |
37 | <p><a href="{% url 'password_reset' %}">Lost password?</a></p> | |
38 | ||
39 | {% endblock %} |