Fix a bug -- json not imported; use JsonResponse instead of

HttpResponse
This commit is contained in:
M.Ravi 2018-06-27 12:34:41 +02:00
parent f1e021e1e9
commit 5eff54cffe

View file

@ -1266,10 +1266,7 @@ class VirtualMachineView(LoginRequiredMixin, View):
["%s=%s" % (k, v) for (k, v) in admin_email_body.items()]), ["%s=%s" % (k, v) for (k, v) in admin_email_body.items()]),
} }
send_plain_email_task.delay(email_to_admin_data) send_plain_email_task.delay(email_to_admin_data)
return HttpResponse( return JsonResponse(response)
json.dumps(response),
content_type="application/json"
)
class HostingBillListView(PermissionRequiredMixin, LoginRequiredMixin, class HostingBillListView(PermissionRequiredMixin, LoginRequiredMixin,