From c2b2bf5655f3ab188509a7c3f2c8ae5aceb95641 Mon Sep 17 00:00:00 2001 From: TKroenert Date: Sat, 5 Mar 2011 05:01:03 +0100 Subject: [PATCH] *fix: json will umbedingt eine liste,damit es die serialized --- k4ever/api/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/k4ever/api/views.py b/k4ever/api/views.py index 364c227..1873c83 100644 --- a/k4ever/api/views.py +++ b/k4ever/api/views.py @@ -25,7 +25,7 @@ def showItem(request, itemid): return HttpResponse(status=400) #return json-container - container = serializers.serialize('json', item) + container = serializers.serialize('json', [item]) return HttpResponse(container,'application/javascript') @@ -67,6 +67,6 @@ def buyItem(request, itemid, buymode=""): def history(request): hist = Order.objects.filter(user=request.user.id).order_by("-dateTime") #return json-container - container = serializers.serialize('json', hist) + container = serializers.serialize('json', [hist]) return HttpResponse(container,'application/javascript')