|
|
|
|
@ -37,8 +37,10 @@ class IndexView(TemplateView): |
|
|
|
|
school_schedule.current_live_lesson() |
|
|
|
|
) |
|
|
|
|
online_coming_soon = ( |
|
|
|
|
school_schedule.start_at < now_time.time() and |
|
|
|
|
(school_schedule.start_at - timedelta(hours=5)).time() >= now_time.time() and |
|
|
|
|
school_schedule.start_at > now_time.time() and |
|
|
|
|
( |
|
|
|
|
datetime.combine(datetime.today(), school_schedule.start_at) - timedelta(hours=5) |
|
|
|
|
).time() <= now_time.time() and |
|
|
|
|
school_schedule.current_live_lesson() |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
@ -71,6 +73,7 @@ class IndexView(TemplateView): |
|
|
|
|
context.update({ |
|
|
|
|
'online': online, |
|
|
|
|
'online_coming_soon': online_coming_soon, |
|
|
|
|
'school_schedule': school_schedule, |
|
|
|
|
'course_items': Course.objects.filter(status=Course.PUBLISHED)[:6], |
|
|
|
|
'is_purchased': school_payment_exists, |
|
|
|
|
'min_school_price': SchoolSchedule.objects.aggregate(Min('month_price'))['month_price__min'], |
|
|
|
|
|