Ticket #12249: 12249_docs_patch.diff

File 12249_docs_patch.diff, 1.1 KB (added by Gabriel Hurley, 15 years ago)

Adds info on csrf_token ahead of the form in question.

  • docs/topics/auth.txt

     
    786786    Here's a sample :file:`registration/login.html` template you can use as a
    787787    starting point. It assumes you have a :file:`base.html` template that
    788788    defines a ``content`` block:
     789   
     790    .. versionadded:: 1.2
     791   
     792    Note that the ``{% csrf_token %}`` in the form below is now required for
     793    compatibility with CSRF protection. See the :ref:`UPGRADE INSTRUCTIONS <ref-csrf-upgrading-notes>`
     794    for more information.
    789795
    790796    .. code-block:: html
    791797
     
    797803        <p>Your username and password didn't match. Please try again.</p>
    798804        {% endif %}
    799805
    800         <form method="post" action="{% url django.contrib.auth.views.login %}">{% csrf_token %}
     806        <form method="post" action="{% url django.contrib.auth.views.login %}">
     807        {% csrf_token %}
    801808        <table>
    802809        <tr>
    803810            <td>{{ form.username.label_tag }}</td>
Back to Top