Atur Jenis Konten Respons HTTP Django

reponse = HttpResponse(content)
response['Content-Type'] = 'application/json' # or application/text, etc.

# one-line usage
reponse = HttpResponse(content, content_type:'application/json')
Lovely Coder