remove old has_tickets context_processors

This commit is contained in:
Thomas Steen Rasmussen 2017-10-04 00:25:19 +02:00
parent 66014811a4
commit e957942181
2 changed files with 0 additions and 9 deletions

View file

@ -78,7 +78,6 @@ TEMPLATES = [
'django.contrib.auth.context_processors.auth', 'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages', 'django.contrib.messages.context_processors.messages',
'shop.context_processors.current_order', 'shop.context_processors.current_order',
'shop.context_processors.user_has_tickets',
'camps.context_processors.camp', 'camps.context_processors.camp',
], ],
}, },

View file

@ -13,11 +13,3 @@ def current_order(request):
return {} 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}