|
|
|
|
@ -96,8 +96,8 @@ 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=date_now.weekday()-F('weekday') % 7, |
|
|
|
|
).order_by('-width'), |
|
|
|
|
width=(F('weekday') - date_now.isoweekday()) % 7, |
|
|
|
|
).order_by('width'), |
|
|
|
|
'school_schedules_purchased': school_schedules_purchased, |
|
|
|
|
'subscription_ends': school_payment.filter(add_days=False).first().date_end if school_payment_exists else None, |
|
|
|
|
}) |
|
|
|
|
|