From 469bf2db15597f2c87cb0f8f64132056d2467f15 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Mon, 3 Feb 2020 12:43:11 +0000 Subject: [PATCH] Fixed #31210 -- Doc'd how to reproduce HttpRequest.is_ajax() in release notes. --- docs/releases/3.1.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/releases/3.1.txt b/docs/releases/3.1.txt index aaf64b2e2b..4a165156e1 100644 --- a/docs/releases/3.1.txt +++ b/docs/releases/3.1.txt @@ -482,6 +482,10 @@ Miscellaneous the new :meth:`.HttpRequest.accepts` method if your code depends on the client ``Accept`` HTTP header. + If you are writing your own AJAX detection method, ``request.is_ajax()`` can + be reproduced exactly as + ``request.headers.get('x-requested-with') == 'XMLHttpRequest'``. + * The encoding format of cookies values used by :class:`~django.contrib.messages.storage.cookie.CookieStorage` is different from the format generated by older versions of Django. Support for the old