Le 20.11.19 à 22:46, Curtis Maloney a écrit : > My reading of this discussion boils down to "if we get rid of is_ajax (a > buy-in convention nobody can rely on), how do people decide if it's an > AJAX call or not?". To my mind, the "content negotiation" advocates have > it right: HTTP has a mechanism for determining what response format is > desired.
It doesn't cover all use cases. For example, I have a use case where an AJAX call only returns a partial HTML snippet while a non-AJAX call is returning a full HTML page (same content type in both cases) . But in that case, I agree with a previous poster that it's a matter of convention between client and server. I can rather easily create my own `is_ajax(request)` utility depending on the convention I choose. Claude -- www.2xlibre.net -- 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/53992754-6e8d-b138-a88b-85d4cfc68891%402xlibre.net.
