|
|
|
|
@ -37,7 +37,9 @@ class IndexView(TemplateView): |
|
|
|
|
date_now = now_time.date() |
|
|
|
|
if self.request.user.is_authenticated: |
|
|
|
|
schoolpayment_queryset = self.request.user.school_payments() |
|
|
|
|
school_payment_exists = schoolpayment_queryset.exists() |
|
|
|
|
school_payment_exists = schoolpayment_queryset.filter( |
|
|
|
|
weekdays__contains=[now_time.isoweekday()] |
|
|
|
|
).exists() |
|
|
|
|
school_schedules_purchased = schoolpayment_queryset.annotate( |
|
|
|
|
joined_weekdays=Func(F('weekdays'), function='unnest',) |
|
|
|
|
).values_list('joined_weekdays', flat=True).distinct() |
|
|
|
|
|