|
|
|
@ -23,10 +23,10 @@ class IndexView(TemplateView): |
|
|
|
except SchoolSchedule.DoesNotExist: |
|
|
|
except SchoolSchedule.DoesNotExist: |
|
|
|
online = False |
|
|
|
online = False |
|
|
|
else: |
|
|
|
else: |
|
|
|
end_at = datetime.combine(now().today(), school_schedule.start_at) |
|
|
|
end_at = datetime.combine(now_time.today(), school_schedule.start_at) |
|
|
|
online = ( |
|
|
|
online = ( |
|
|
|
school_schedule.start_at <= now().time() and |
|
|
|
school_schedule.start_at <= now_time.time() and |
|
|
|
end_at + timedelta(hours=2) >= now() and |
|
|
|
(end_at + timedelta(hours=2)).time() >= now_time.time() and |
|
|
|
school_schedule.current_live_lesson() |
|
|
|
school_schedule.current_live_lesson() |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|