summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Plant <L.Plant.98@cantab.net>2011-05-09 19:06:49 +0000
committerLuke Plant <L.Plant.98@cantab.net>2011-05-09 19:06:49 +0000
commit7c648ea4aa2339cf0492d8c8da031dccce5458b1 (patch)
tree314d87881532617744cabb3c69a8166a2cf0aa74
parent5df93d529d6dd375adaf2f1c2dbd5814e26bad2f (diff)
Mentioned simplification of AJAX example code in CSRF docs.
Refs #15469. Thanks to aaugustin for the suggestion git-svn-id: http://code.djangoproject.com/svn/django/trunk@16190 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--docs/ref/contrib/csrf.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/docs/ref/contrib/csrf.txt b/docs/ref/contrib/csrf.txt
index 8c00304560..6d9a33db22 100644
--- a/docs/ref/contrib/csrf.txt
+++ b/docs/ref/contrib/csrf.txt
@@ -123,6 +123,11 @@ Adding this to a javascript file that is included on your site will ensure that
AJAX POST requests that are made via jQuery will not be caught by the CSRF
protection.
+The above code could be simplified by using the `jQuery cookie plugin
+<http://plugins.jquery.com/project/Cookie>`_ to replace ``getCookie``, and
+`settings.crossDomain <http://api.jquery.com/jQuery.ajax>`_ in jQuery 1.5 and
+later to replace ``sameOrigin``.
+
The decorator method
--------------------