From 19ae56b1e05f891a2c61f69e3f72d395277a6d65 Mon Sep 17 00:00:00 2001 From: Konrad Mohrfeldt Date: Wed, 25 May 2011 15:53:31 +0200 Subject: [PATCH] changed response mimetype for api from application/javascript to application/json (rfc 4627) --- k4ever/api/views.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/k4ever/api/views.py b/k4ever/api/views.py index 1873c83..8ada0eb 100644 --- a/k4ever/api/views.py +++ b/k4ever/api/views.py @@ -14,7 +14,7 @@ def showItems(request): #return json-container container = serializers.serialize('json', items) - return HttpResponse(container,'application/javascript') + return HttpResponse(container,'application/json') @login_required def showItem(request, itemid): @@ -26,7 +26,7 @@ def showItem(request, itemid): #return json-container container = serializers.serialize('json', [item]) - return HttpResponse(container,'application/javascript') + return HttpResponse(container,'application/json') @login_required @@ -59,7 +59,7 @@ def buyItem(request, itemid, buymode=""): #return json-container #container = serializers.serialize('json', items) - #return HttpResponse(container,'application/javascript') + #return HttpResponse(container,'application/json') return HttpResponse(status=200) #return HttpResponseRedirect("/store/bought/%s/" % (order.id)) @@ -68,5 +68,5 @@ def history(request): hist = Order.objects.filter(user=request.user.id).order_by("-dateTime") #return json-container container = serializers.serialize('json', [hist]) - return HttpResponse(container,'application/javascript') + return HttpResponse(container,'application/json')