|
Last change
on this file was
695d358,
checked in by Alex Dehnert <adehnert@…>, 12 years ago
|
|
Django 1.6: use new {% url %} syntax
Starting in Django 1.5, the argument to {% url %} is treated as a variable,
rather than a literal. To get a literal, we need to enclose the argument in
quotes. For Django 1.4 support, we also want to do {% load url from future %}
-- probably in more places than just base.html, but we'll see.
|
-
Property mode set to
100644
|
|
File size:
649 bytes
|
| Line | |
|---|
| 1 | {% extends "base.html" %} |
|---|
| 2 | {% load url from future %} |
|---|
| 3 | |
|---|
| 4 | {% block title %}Log in to Remit{% endblock %} |
|---|
| 5 | |
|---|
| 6 | {% block content %} |
|---|
| 7 | |
|---|
| 8 | <h2>Log in to Remit</h2> |
|---|
| 9 | |
|---|
| 10 | {% if form.errors %} |
|---|
| 11 | <p>Your username and password didn't match. Please try again.</p> |
|---|
| 12 | {% endif %} |
|---|
| 13 | |
|---|
| 14 | <form method="post" action="{% url "django.contrib.auth.views.login" %}"> |
|---|
| 15 | {% csrf_token %} |
|---|
| 16 | <table> |
|---|
| 17 | <tr> |
|---|
| 18 | <td>{{ form.username.label_tag }}</td> |
|---|
| 19 | <td>{{ form.username }}</td> |
|---|
| 20 | </tr> |
|---|
| 21 | <tr> |
|---|
| 22 | <td>{{ form.password.label_tag }}</td> |
|---|
| 23 | <td>{{ form.password }}</td> |
|---|
| 24 | </tr> |
|---|
| 25 | </table> |
|---|
| 26 | |
|---|
| 27 | <input type="submit" value="login" /> |
|---|
| 28 | <input type="hidden" name="next" value="{{ next }}" /> |
|---|
| 29 | </form> |
|---|
| 30 | |
|---|
| 31 | {% endblock %} |
|---|
Note: See
TracBrowser
for help on using the repository browser.