event.py (544B)
1 from config import SCHOOLOGY_DOMAIN 2 3 4 class Event: 5 def __init__(self, id, name, description, start, end=None): 6 self.name = name 7 self.description = description 8 self.link = f"{SCHOOLOGY_DOMAIN}/event/{str(id)}" 9 self.start = start 10 self.end = end 11 if end and ( 12 self.end.year != self.start.year 13 or self.end.month != self.start.month 14 or self.end.day != start.day 15 ): 16 self.differentDay = True 17 else: 18 self.differentDay = False