This is related to this question: Django return json and html depending on client python
I have a command line Python API for a Django app. When I access the a
You could also check the request accept content type as specified in the rfc. That way you can render by default HTML and where your client accept application/jason you can return json in your response without a template being required