From c9d01ba95f0d18b722623c5bc16575abf689040d Mon Sep 17 00:00:00 2001 From: PCoder Date: Tue, 3 Jul 2018 21:52:44 +0200 Subject: [PATCH] Fix some errors --- hosting/views.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hosting/views.py b/hosting/views.py index 778b3835..1a9a3c30 100644 --- a/hosting/views.py +++ b/hosting/views.py @@ -15,6 +15,7 @@ from django.http import ( Http404, HttpResponseRedirect, HttpResponse, JsonResponse ) from django.shortcuts import redirect, render +from django.utils.html import escape from django.utils.http import urlsafe_base64_decode from django.utils.safestring import mark_safe from django.utils.translation import get_language, ugettext_lazy as _ @@ -1012,9 +1013,7 @@ class OrdersHostingDetailView(LoginRequiredMixin, DetailView): ' back to the payment page.') ) } - return HttpResponse( - json.dumps(response), content_type="application/json" - ) + return JsonResponse(response) else: card_id = request.session.get('card_id') user_card_detail = UserCardDetail.objects.get(id=card_id)