Use JsonResponse instead of HttpResponse(json.dumps()).