|
|
|
|
@ -54,18 +54,18 @@ class Tournament(models.Model): |
|
|
|
|
return self.start_date.strftime("%d/%m/%y") |
|
|
|
|
|
|
|
|
|
def team_summons(self): |
|
|
|
|
|
|
|
|
|
summons = [] |
|
|
|
|
for team_registration in self.teamregistration_set.all(): |
|
|
|
|
next_match = team_registration.next_match() |
|
|
|
|
if next_match: |
|
|
|
|
match = None |
|
|
|
|
match = team_registration.next_match() |
|
|
|
|
if match: |
|
|
|
|
names = team_registration.team_names() |
|
|
|
|
stage = next_match.stage_name() |
|
|
|
|
stage = match.stage_name() |
|
|
|
|
weight = team_registration.weight() |
|
|
|
|
summon = TeamSummon(names, next_match.start_date, weight, stage, team_registration.logo) |
|
|
|
|
summon = TeamSummon(names, match.start_date, weight, stage, team_registration.logo) |
|
|
|
|
summons.append(summon) |
|
|
|
|
summons.sort(key=lambda s: s.weight) |
|
|
|
|
|
|
|
|
|
summons.sort(key=lambda s: s.weight) |
|
|
|
|
return summons |
|
|
|
|
|
|
|
|
|
def live_matches(self, broadcasted): |
|
|
|
|
|