{"version":"1.0","type":"rich","title":"Creating Intercooler-friendly custom endpoints in a Django Rest Framework viewset.","description":"This example shows a Django Rest Framework viewset that returns plain HTML responses for Intercooler AJAX requests while using normal content negotiation for other clients. A custom `IntercoolerContentNegotiation` class overrides `select_renderer` to check for an `ic-request` parameter in the request data, switching to `StaticHTMLRenderer` and `text/html` when present. The viewset defines two custom actions, `do_something` and `do_something_else`, each returning a simple `Response` object with a string. The code demonstrates how to integrate Intercooler’s request pattern into DRF’s renderer selection mechanism without altering the view logic.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-11321736?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}