From 45d15919cf6e9d5f19794ba535da06f5bce646e9 Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Tue, 27 Feb 2018 18:40:05 +0100 Subject: [PATCH] change some code --- django/didgeridoo/webshop/views.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/django/didgeridoo/webshop/views.py b/django/didgeridoo/webshop/views.py index 604d9d8..c2f363c 100644 --- a/django/didgeridoo/webshop/views.py +++ b/django/didgeridoo/webshop/views.py @@ -363,10 +363,8 @@ def checkout(request): # Here we handle all POST Operations: if request.method == 'POST': - print('checkout post', request.POST) # here we react to a change of amount per item in the Cart: if 'checkout' in request.POST: - print('checkout post request.POST = checkout_form') checkout_form = CheckoutForm(request.POST) if checkout_form.is_valid(): orderstatus = OrderStatus.objects.get(name='ordered') @@ -386,8 +384,7 @@ def checkout(request): amount=position.amount, price_in_chf=position.article.price_in_chf ) - cart.delete() - cart = False + return HttpResponseRedirect('/order/') return render(request, 'webshop/checkout.html', {'cart_position_list': cart_position_list,