Extending different base template for ajax requests in DjangoThe yesno template filter is a simple and effective way to decide AJAX responses based on whether the request is an AJAX call.