mirror of https://github.com/django/django.git
Added syntax highlighting to CSRF example.
This commit is contained in:
parent
19ff506878
commit
261738990e
|
@ -37,7 +37,9 @@ To take advantage of CSRF protection in your views, follow these steps:
|
|||
you want to protect (see below).
|
||||
|
||||
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 %}
|
||||
|
||||
|
|
Loading…
Reference in New Issue