+1 from me
- At least for 400, 500, and CSRF errors, send JSON (or empty response)
> back instead of HTML if the request is xhr or has JSON headers
>
It's possible to detect requests for JSON with request.accepts() , which
the previous PR from vanadium23 predates.
There's no way to detect "if th
I've done some work long ago. May be will help for someone.
https://github.com/django/django/pull/8947
On Friday, 22 April 2022 at 08:53:56 UTC+3 Tobias Bengfort wrote:
> +1 from me.
>
> On 14/04/2022 11.03, Ville Säävuori wrote:
> > And to be clear, I understand we already have middleware APIs a
+1 from me.
On 14/04/2022 11.03, Ville Säävuori wrote:
And to be clear, I understand we already have middleware APIs and
various settings to handle this but my point is that I think handling
this in Django core (even as an optional setting or middleware) would be
most useful and right way to d
I encountered this problem many times myself, so I'm +1 for this proposal.
– Jacob
--
You received this message because you are subscribed to the Google Groups
"Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an
Hello Django devs!
I'm a long time Django user and nowadays work with sites where Django is
mostly or only an API for the front end. I'm assuming this is not an exotic
use case in 2022.
One pain point I continue to come across over and over again is that Django
by default only speaks text/html