#26590: Make AJAX requests in the test client using a kwarg. ie. ajax=True
-----------------------------------+--------------------
Reporter: nwjlyons | Owner: nobody
Type: New feature | Status: new
Component: Testing framework | Version: 1.9
Severity: Normal | Keywords: ajax
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+--------------------
Has it been suggested before to simulate an AJAX request by passing a
boolean instead of HTTP_X_REQUESTED_WITH='XMLHttpRequest'? ie
self.client.get("/foobar", ajax=True)
I'm sure people would use this as it is easier to remember. I always need
to Google how to make AJAX requests in the test client as
HTTP_X_REQUESTED_WITH='XMLHttpRequest' isn't particularly memorable.
--
Ticket URL: <https://code.djangoproject.com/ticket/26590>
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/051.f3aed8b9dfe076ca83019ae044839cf1%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.