show cathegories on side of currencies and orders
This commit is contained in:
parent
144a18d2e9
commit
4672c458d6
|
@ -4,7 +4,7 @@ from currencies.models import (ExchangeRate,
|
|||
ExchangeRate_date,
|
||||
ExchangeRate_name)
|
||||
from currencies import exchange_rates
|
||||
from django.http import JsonResponse
|
||||
from webshop.utils import get_categories
|
||||
|
||||
|
||||
def currencies(request):
|
||||
|
@ -160,9 +160,10 @@ def currencies(request):
|
|||
"""
|
||||
# know we can query our data for presentaton:
|
||||
ordered_currency_list = ExchangeRate.objects.order_by('name', 'date')
|
||||
|
||||
category_list = get_categories()
|
||||
# and publish it on template:
|
||||
return render(request,
|
||||
'currencies/index.html',
|
||||
{'ordered_currency_list': ordered_currency_list,
|
||||
'category_list': category_list,
|
||||
'message': message})
|
||||
|
|
|
@ -418,6 +418,7 @@ def checkout(request):
|
|||
|
||||
|
||||
def order(request, order_id):
|
||||
category_list = get_categories()
|
||||
price_list = []
|
||||
totalprice_list = []
|
||||
order_position_list_zip = []
|
||||
|
@ -465,4 +466,5 @@ def order(request, order_id):
|
|||
'order_position_list_zip': order_position_list_zip,
|
||||
'total': total,
|
||||
'currency_name': currency_name,
|
||||
'category_list': category_list,
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue