Added voucher redemption

This commit is contained in:
Raphael Michel
2016-02-11 16:41:22 +01:00
parent bcde964ea3
commit f18a180ae4
15 changed files with 226 additions and 66 deletions

View File

@@ -60,5 +60,11 @@ class EventIndex(EventViewMixin, CartMixin, TemplateView):
group[0] is not None and group[0].id is not None) else (0, 0)
)
vouchers_exist = self.request.event.get_cache().get('vouchers_exist')
if vouchers_exist is None:
vouchers_exist = self.request.event.vouchers.exists()
self.request.event.get_cache().set('vouchers_exist', vouchers_exist)
context['vouchers_exist'] = vouchers_exist
context['cart'] = self.get_cart()
return context