remove old has_tickets context_processors
This commit is contained in:
parent
66014811a4
commit
e957942181
|
@ -78,7 +78,6 @@ TEMPLATES = [
|
|||
'django.contrib.auth.context_processors.auth',
|
||||
'django.contrib.messages.context_processors.messages',
|
||||
'shop.context_processors.current_order',
|
||||
'shop.context_processors.user_has_tickets',
|
||||
'camps.context_processors.camp',
|
||||
],
|
||||
},
|
||||
|
|
|
@ -13,11 +13,3 @@ def current_order(request):
|
|||
return {}
|
||||
|
||||
|
||||
def user_has_tickets(request):
|
||||
has_tickets = False
|
||||
if hasattr(request.user, 'orders') and request.user.orders.filter(
|
||||
tickets__product__category__name=settings.TICKET_CATEGORY_NAME
|
||||
).exists():
|
||||
has_tickets = True
|
||||
return {'has_tickets': has_tickets}
|
||||
|
||||
|
|
Loading…
Reference in a new issue