summaryrefslogtreecommitdiff
path: root/docs/ref/contrib/csrf.txt
diff options
context:
space:
mode:
Diffstat (limited to 'docs/ref/contrib/csrf.txt')
-rw-r--r--docs/ref/contrib/csrf.txt9
1 files changed, 7 insertions, 2 deletions
diff --git a/docs/ref/contrib/csrf.txt b/docs/ref/contrib/csrf.txt
index d8a944b10a..c32dd73986 100644
--- a/docs/ref/contrib/csrf.txt
+++ b/docs/ref/contrib/csrf.txt
@@ -1,5 +1,3 @@
-.. _ref-contrib-csrf:
-
=====================================
Cross Site Request Forgery protection
=====================================
@@ -400,6 +398,13 @@ set a flag on requests which relaxes the middleware and the ``csrf_protect``
decorator so that they no longer rejects requests. In every other respect
(e.g. sending cookies etc.), they behave the same.
+If, for some reason, you *want* the test client to perform CSRF
+checks, you can create an instance of the test client that enforces
+CSRF checks::
+
+ >>> from django.test import Client
+ >>> csrf_client = Client(enforce_csrf_checks=True)
+
Limitations
===========