|
|
|
|
@ -124,8 +124,9 @@ class SchoolView(TemplateView): |
|
|
|
|
'is_purchased': school_payment_exists, |
|
|
|
|
'min_school_price': SchoolSchedule.objects.aggregate(Min('month_price'))['month_price__min'], |
|
|
|
|
'school_schedules': SchoolSchedule.objects.annotate( |
|
|
|
|
width=(F('weekday') - date_now.isoweekday()) % 7, |
|
|
|
|
).order_by('width'), |
|
|
|
|
calk=F('weekday') - now().isoweekday(), |
|
|
|
|
weight=(7 + F('calk') % 7) % 7, |
|
|
|
|
).order_by('weight'), |
|
|
|
|
'school_schedules_purchased': school_schedules_purchased, |
|
|
|
|
'subscription_ends': school_payment.filter(add_days=False).first().date_end if school_payment_exists else None, |
|
|
|
|
}) |
|
|
|
|
|