|
|
|
|
@ -318,7 +318,9 @@ class Match(models.Model): |
|
|
|
|
group_stage_name = self.group_stage.display_name() |
|
|
|
|
|
|
|
|
|
ended = self.end_date is not None |
|
|
|
|
livematch = LiveMatch(title, date, time_indication, court, self.started(), ended, group_stage_name) |
|
|
|
|
live_format = "Format " + FederalMatchCategory(self.format).format_label_short |
|
|
|
|
|
|
|
|
|
livematch = LiveMatch(title, date, time_indication, court, self.started(), ended, group_stage_name, live_format) |
|
|
|
|
|
|
|
|
|
for team in self.live_teams(): |
|
|
|
|
livematch.add_team(team) |
|
|
|
|
@ -369,7 +371,7 @@ class Team: |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
class LiveMatch: |
|
|
|
|
def __init__(self, title, date, time_indication, court, started, ended, group_stage_name): |
|
|
|
|
def __init__(self, title, date, time_indication, court, started, ended, group_stage_name, format): |
|
|
|
|
self.title = title |
|
|
|
|
self.date = date |
|
|
|
|
self.teams = [] |
|
|
|
|
@ -379,6 +381,7 @@ class LiveMatch: |
|
|
|
|
self.ended = ended |
|
|
|
|
self.has_walk_out = False |
|
|
|
|
self.group_stage_name = group_stage_name |
|
|
|
|
self.format = format |
|
|
|
|
|
|
|
|
|
def add_team(self, team): |
|
|
|
|
self.teams.append(team) |
|
|
|
|
@ -396,6 +399,7 @@ class LiveMatch: |
|
|
|
|
"ended": self.ended, |
|
|
|
|
"has_walk_out": self.has_walk_out, |
|
|
|
|
"group_stage_name": self.group_stage_name, |
|
|
|
|
"format": self.format |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
def show_time_indication(self): |
|
|
|
|
|