Updated example login template to be best-practice and use the url tag from 'future'

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14778 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Luke Plant 2010-12-02 14:27:03 +00:00
parent 1c9a506d21
commit 300a5b32e6
1 changed files with 2 additions and 1 deletions

View File

@ -840,6 +840,7 @@ The login_required decorator
.. code-block:: html+django .. code-block:: html+django
{% extends "base.html" %} {% extends "base.html" %}
{% load url from future %}
{% block content %} {% block content %}
@ -847,7 +848,7 @@ The login_required decorator
<p>Your username and password didn't match. Please try again.</p> <p>Your username and password didn't match. Please try again.</p>
{% endif %} {% endif %}
<form method="post" action="{% url django.contrib.auth.views.login %}"> <form method="post" action="{% url 'django.contrib.auth.views.login' %}">
{% csrf_token %} {% csrf_token %}
<table> <table>
<tr> <tr>