mirror of
https://github.com/django/django.git
synced 2025-06-05 03:29:12 +00:00
[1.6.x] Corrected indentation in docs to prevent inadvertent blockquote.
Backport of c2d8da7555e3fef30c43f3ffe2e8963ca1f9fdd5 from stable/1.7.x
This commit is contained in:
parent
b6c05b2b94
commit
79561e7c3b
@ -304,11 +304,11 @@ Methods
|
||||
|
||||
.. method:: HttpRequest.is_ajax()
|
||||
|
||||
Returns ``True`` if the request was made via an ``XMLHttpRequest``, by
|
||||
checking the ``HTTP_X_REQUESTED_WITH`` header for the string
|
||||
``'XMLHttpRequest'``. Most modern JavaScript libraries send this header.
|
||||
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.
|
||||
Returns ``True`` if the request was made via an ``XMLHttpRequest``, by
|
||||
checking the ``HTTP_X_REQUESTED_WITH`` header for the string
|
||||
``'XMLHttpRequest'``. Most modern JavaScript libraries send this header.
|
||||
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.
|
||||
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user