*fix: json will umbedingt eine liste,damit es die serialized
This commit is contained in:
parent
886dc7eb45
commit
c2b2bf5655
|
@ -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')
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue