|
|
|
|
@ -234,25 +234,9 @@ class Tournament(BaseModel): |
|
|
|
|
def get_tournament_status(self): |
|
|
|
|
return self.get_online_registration_status().status_localized() |
|
|
|
|
|
|
|
|
|
def tournament_status_display(self): |
|
|
|
|
teams = self.teams(True) |
|
|
|
|
if self.supposedly_in_progress() or self.end_date is not None or self.should_be_over(): |
|
|
|
|
teams = [t for t in teams if t.stage != "Attente"] |
|
|
|
|
if teams is not None and len(teams) > 0: |
|
|
|
|
word = "équipe" |
|
|
|
|
if len(teams) > 1: |
|
|
|
|
word = word + "s" |
|
|
|
|
return f"{len(teams)} {word}" |
|
|
|
|
else: |
|
|
|
|
return None |
|
|
|
|
|
|
|
|
|
if teams is not None and len(teams) > 0: |
|
|
|
|
word = "inscription" |
|
|
|
|
if len(teams) > 1: |
|
|
|
|
word = word + "s" |
|
|
|
|
return f"{len(teams)} {word}" |
|
|
|
|
else: |
|
|
|
|
return None |
|
|
|
|
def get_tournament_status_team_count(self): |
|
|
|
|
active_teams_count = self.team_registrations.filter(walk_out=False).count() |
|
|
|
|
return min(active_teams_count, self.team_count) |
|
|
|
|
|
|
|
|
|
def name_and_event(self): |
|
|
|
|
event_name = None |
|
|
|
|
|