Kaydet (Commit) 7c648ea4 authored tarafından Luke Plant's avatar Luke Plant

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
üst 5df93d52
...@@ -123,6 +123,11 @@ Adding this to a javascript file that is included on your site will ensure that ...@@ -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 AJAX POST requests that are made via jQuery will not be caught by the CSRF
protection. 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 The decorator method
-------------------- --------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment