assign the list before the view starts

Unassigned variables cause the cart to crash at the first run.
This commit is contained in:
Andreas Zweili 2018-02-21 21:11:52 +01:00
parent cfa588f3b3
commit 935c97de46
1 changed files with 2 additions and 0 deletions

View File

@ -220,6 +220,8 @@ def cart(request):
totalprice_list = []
total = 0
user_name = request.user
cart_position_list_zip = []
# here we configure the users Currency:
if 'currency' not in request.session:
request.session['currency'] = None