Added products that require a voucher to be bought/shown

This commit is contained in:
Raphael Michel
2016-07-28 19:52:07 +02:00
parent 03a56f81ca
commit f91c95b1bc
10 changed files with 111 additions and 3 deletions

View File

@@ -31,6 +31,7 @@ class EventIndex(EventViewMixin, CartMixin, TemplateView):
Q(active=True)
& Q(Q(available_from__isnull=True) | Q(available_from__lte=now()))
& Q(Q(available_until__isnull=True) | Q(available_until__gte=now()))
& Q(hide_without_voucher=False)
).select_related(
'category', # for re-grouping
).prefetch_related(