*fix: json will umbedingt eine liste,damit es die serialized

This commit is contained in:
TKroenert 2011-03-05 05:01:03 +01:00
parent 886dc7eb45
commit c2b2bf5655
1 changed files with 2 additions and 2 deletions

View File

@ -25,7 +25,7 @@ def showItem(request, itemid):
return HttpResponse(status=400) return HttpResponse(status=400)
#return json-container #return json-container
container = serializers.serialize('json', item) container = serializers.serialize('json', [item])
return HttpResponse(container,'application/javascript') return HttpResponse(container,'application/javascript')
@ -67,6 +67,6 @@ def buyItem(request, itemid, buymode=""):
def history(request): def history(request):
hist = Order.objects.filter(user=request.user.id).order_by("-dateTime") hist = Order.objects.filter(user=request.user.id).order_by("-dateTime")
#return json-container #return json-container
container = serializers.serialize('json', hist) container = serializers.serialize('json', [hist])
return HttpResponse(container,'application/javascript') return HttpResponse(container,'application/javascript')