I think this is a good starting point. What do we think about adding a “accepts_json” helper of some kind? It seems that the vast, vast majority of usages I can find of “is_ajax” is to return a JSON response, which I feel could be served nicely with a helper. There are also, annoyingly, two different JSON content types that are sent (the correct application/json and the incorrect text/json), which a helper could take care of.
> On 17 Nov 2019, at 12:56, Claude Paroz <[email protected]> wrote: > > I'm afraid that implementing a whole content negociation framework is a bit > ambitious, unless someone has much time to devote to that. > > We could start smaller, similar to django-accept-header. I quickly sketched > what it could look like in: > https://github.com/django/django/compare/master...claudep:accept_header?expand=1 > > Claude > > Le dimanche 17 novembre 2019 12:32:50 UTC+1, Asif Saif Uddin a écrit : > any plan with > https://github.com/django/deps/blob/master/draft/content-negotiation.rst > <https://github.com/django/deps/blob/master/draft/content-negotiation.rst> > one? > > > -- > 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 > email to [email protected] > <mailto:[email protected]>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-developers/7aff16cc-aeff-4b5e-b402-e4d587bc9315%40googlegroups.com > > <https://groups.google.com/d/msgid/django-developers/7aff16cc-aeff-4b5e-b402-e4d587bc9315%40googlegroups.com?utm_medium=email&utm_source=footer>. -- 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 email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/22260C6C-702C-40F3-A847-38C0A69D3C43%40tomforb.es.
