~ubuntu-branches/ubuntu/quantal/python-django/quantal-security

« back to all changes in this revision

Viewing changes to docs/ref/contrib/csrf.txt

  • Committer: Bazaar Package Importer
  • Author(s): Jamie Strandboge
  • Date: 2010-10-12 11:34:35 UTC
  • mfrom: (1.2.7 upstream)
  • mto: This revision was merged to the branch mainline in revision 30.
  • Revision ID: james.westby@ubuntu.com-20101012113435-9lnsrh0i3mxozbt0
Tags: upstream-1.2.3
ImportĀ upstreamĀ versionĀ 1.2.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.. _ref-contrib-csrf:
2
 
 
3
1
=====================================
4
2
Cross Site Request Forgery protection
5
3
=====================================
400
398
decorator so that they no longer rejects requests.  In every other respect
401
399
(e.g. sending cookies etc.), they behave the same.
402
400
 
 
401
If, for some reason, you *want* the test client to perform CSRF
 
402
checks, you can create an instance of the test client that enforces
 
403
CSRF checks::
 
404
 
 
405
    >>> from django.test import Client
 
406
    >>> csrf_client = Client(enforce_csrf_checks=True)
 
407
 
403
408
Limitations
404
409
===========
405
410