mirror of https://github.com/django/django.git
[1.7.x] Corrected indentation in docs to prevent inadvertent blockquote.
This commit is contained in:
parent
47912d9f2b
commit
c2d8da7555
|
@ -308,11 +308,11 @@ Methods
|
||||||
|
|
||||||
.. method:: HttpRequest.is_ajax()
|
.. method:: HttpRequest.is_ajax()
|
||||||
|
|
||||||
Returns ``True`` if the request was made via an ``XMLHttpRequest``, by
|
Returns ``True`` if the request was made via an ``XMLHttpRequest``, by
|
||||||
checking the ``HTTP_X_REQUESTED_WITH`` header for the string
|
checking the ``HTTP_X_REQUESTED_WITH`` header for the string
|
||||||
``'XMLHttpRequest'``. Most modern JavaScript libraries send this header.
|
``'XMLHttpRequest'``. Most modern JavaScript libraries send this header.
|
||||||
If you write your own XMLHttpRequest call (on the browser side), you'll
|
If you write your own XMLHttpRequest call (on the browser side), you'll
|
||||||
have to set this header manually if you want ``is_ajax()`` to work.
|
have to set this header manually if you want ``is_ajax()`` to work.
|
||||||
|
|
||||||
If a response varies on whether or not it's requested via AJAX and you are
|
If a response varies on whether or not it's requested via AJAX and you are
|
||||||
using some form of caching like Django's :mod:`cache middleware
|
using some form of caching like Django's :mod:`cache middleware
|
||||||
|
|
Loading…
Reference in New Issue