#31210: Document backwards-compatible replacement for is_ajax()
------------------------------------------------+------------------------
Reporter: Collin Anderson | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
------------------------------------------------+------------------------
`is_ajax()` was deprecated in #30997.
I think the release/upgrading notes should mention `request.is_ajax()` can
be replaced with `request.META.get('HTTP_X_REQUESTED_WITH') ==
'XMLHttpRequest'` to maintain the old behavior.
https://github.com/django/django/blob/e348ab0d4382b0d7cb0cab9d1261c916c3d0ce6c/django/http/request.py#L260-L266
--
Ticket URL: <https://code.djangoproject.com/ticket/31210>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/057.942790d5fc9806f79dae6f2ab88363c7%40djangoproject.com.