[1.9.x] Added syntax highlighting to CSRF example.

Backport of 261738990e07a039b39aab0664eea71f226cd381 from master
This commit is contained in:
B. J. Potter 2016-06-02 14:08:30 -07:00 committed by Tim Graham
parent 5d60eb8bd7
commit 19cb66a54a

View File

@ -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 %}