|
|
|
|
@ -118,7 +118,8 @@ class Match(models.Model): |
|
|
|
|
if self.court: |
|
|
|
|
court = f"Terrain {self.court}" |
|
|
|
|
|
|
|
|
|
livematch = LiveMatch(title, date, duration, court, self.started()) |
|
|
|
|
ended = self.end_date is not None |
|
|
|
|
livematch = LiveMatch(title, date, duration, court, self.started(), ended) |
|
|
|
|
|
|
|
|
|
for team_score in self.sorted_team_scores(): |
|
|
|
|
image = team_score.team_registration.logo |
|
|
|
|
@ -169,13 +170,14 @@ class Team: |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
class LiveMatch: |
|
|
|
|
def __init__(self, title, date, duration, court, started): |
|
|
|
|
def __init__(self, title, date, duration, court, started, ended): |
|
|
|
|
self.title = title |
|
|
|
|
self.date = date |
|
|
|
|
self.teams = [] |
|
|
|
|
self.duration = duration |
|
|
|
|
self.court = court |
|
|
|
|
self.started = started |
|
|
|
|
self.ended = ended |
|
|
|
|
|
|
|
|
|
def add_team(self, team): |
|
|
|
|
self.teams.append(team) |
|
|
|
|
@ -188,6 +190,7 @@ class LiveMatch: |
|
|
|
|
"duration": self.duration, |
|
|
|
|
"court": self.court, |
|
|
|
|
"started": self.started, |
|
|
|
|
"ended": self.ended, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
def has_walk_out(self): |
|
|
|
|
|