Skip to content

Commit

Permalink
[1.9.x] Added syntax highlighting to CSRF example.
Browse files Browse the repository at this point in the history
Backport of 2617389 from master
  • Loading branch information
bjcubsfan authored and timgraham committed Jun 3, 2016
1 parent 5d60eb8 commit 19cb66a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/ref/csrf.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}

Expand Down

0 comments on commit 19cb66a

Please sign in to comment.