mirror of
https://github.com/django/django.git
synced 2025-06-05 03:29:12 +00:00
[1.10.x] Added syntax highlighting to CSRF example.
Backport of 261738990e07a039b39aab0664eea71f226cd381 from master
This commit is contained in:
parent
9a204fc8a5
commit
2e7ec15f53
@ -37,7 +37,9 @@ To take advantage of CSRF protection in your views, follow these steps:
|
|||||||
you want to protect (see below).
|
you want to protect (see below).
|
||||||
|
|
||||||
2. In any template that uses a POST form, use the :ttag:`csrf_token` tag inside
|
2. In any template that uses a POST form, use the :ttag:`csrf_token` tag inside
|
||||||
the ``<form>`` element if the form is for an internal URL, e.g.::
|
the ``<form>`` element if the form is for an internal URL, e.g.:
|
||||||
|
|
||||||
|
.. code-block:: html+django
|
||||||
|
|
||||||
<form action="" method="post">{% csrf_token %}
|
<form action="" method="post">{% csrf_token %}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user