mirror of https://github.com/django/django.git
Recommended the JavaScript Cookie library instead of jQuery cookie.
jQuery cookie is no longer maintained in favor of the JavaScript cookie library. This also removes the jQuery dependency.
This commit is contained in:
parent
47201371d2
commit
f9de197268
|
@ -117,12 +117,12 @@ Acquiring the token is straightforward:
|
||||||
}
|
}
|
||||||
var csrftoken = getCookie('csrftoken');
|
var csrftoken = getCookie('csrftoken');
|
||||||
|
|
||||||
The above code could be simplified by using the `jQuery cookie plugin
|
The above code could be simplified by using the `JavaScript Cookie library
|
||||||
<http://plugins.jquery.com/cookie/>`_ to replace ``getCookie``:
|
<https://github.com/js-cookie/js-cookie/>`_ to replace ``getCookie``:
|
||||||
|
|
||||||
.. code-block:: javascript
|
.. code-block:: javascript
|
||||||
|
|
||||||
var csrftoken = $.cookie('csrftoken');
|
var csrftoken = Cookies.get('csrftoken');
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue