|
|
|
@ -44,7 +44,8 @@ class SchoolSchedule(models.Model): |
|
|
|
return dict(self.WEEKDAY_CHOICES).get(self.weekday, '') |
|
|
|
return dict(self.WEEKDAY_CHOICES).get(self.weekday, '') |
|
|
|
|
|
|
|
|
|
|
|
def is_online(self): |
|
|
|
def is_online(self): |
|
|
|
return now().isoweekday() == self.weekday and now().time() >= self.start_at |
|
|
|
end_at = datetime.combine(now().today(), self.start_at) + timedelta(hours=2) |
|
|
|
|
|
|
|
return self.start_at <= now().time() and end_at.time() >= now().time() |
|
|
|
|
|
|
|
|
|
|
|
def current_live_lesson(self): |
|
|
|
def current_live_lesson(self): |
|
|
|
now_time = now() |
|
|
|
now_time = now() |
|
|
|
|