|
|
|
@ -47,13 +47,19 @@ class Round(SideStoreModel): |
|
|
|
if self.index == 0: |
|
|
|
if self.index == 0: |
|
|
|
return "Finale" |
|
|
|
return "Finale" |
|
|
|
elif self.index == 1: |
|
|
|
elif self.index == 1: |
|
|
|
return "Demies" |
|
|
|
return "Demie" |
|
|
|
elif self.index == 2: |
|
|
|
elif self.index == 2: |
|
|
|
return "Quarts" |
|
|
|
return "Quart" |
|
|
|
else: |
|
|
|
else: |
|
|
|
squared = 2 ** self.index |
|
|
|
squared = 2 ** self.index |
|
|
|
return f"{squared}ème" |
|
|
|
return f"{squared}ème" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def plural_name(self): |
|
|
|
|
|
|
|
name = self.name() |
|
|
|
|
|
|
|
if self.parent is None and self.index > 0: |
|
|
|
|
|
|
|
return f'{name}s' |
|
|
|
|
|
|
|
return name |
|
|
|
|
|
|
|
|
|
|
|
def ranking_matches(self, hide_empty_matches): |
|
|
|
def ranking_matches(self, hide_empty_matches): |
|
|
|
matches = [] |
|
|
|
matches = [] |
|
|
|
for child in self.children.all(): |
|
|
|
for child in self.children.all(): |
|
|
|
@ -165,7 +171,7 @@ class Round(SideStoreModel): |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if first_half_matches: |
|
|
|
if first_half_matches: |
|
|
|
name = self.name() |
|
|
|
name = self.plural_name() |
|
|
|
if parent_round and first_half_matches[0].name is not None: |
|
|
|
if parent_round and first_half_matches[0].name is not None: |
|
|
|
name = first_half_matches[0].name |
|
|
|
name = first_half_matches[0].name |
|
|
|
match_group = self.tournament.create_match_group( |
|
|
|
match_group = self.tournament.create_match_group( |
|
|
|
|