I find Django's request.is_ajax a very useful way to add progressive enhancement via JS and still keep DRY in my views.
However, I want to use class-based views and render with a different template if request.is_ajax.
It is not clear to me how I can override my default "template_name" and make the template loading conditional in class-based views.
How can I do this?