|
|
|
@ -244,7 +244,13 @@ class Tournament(models.Model): |
|
|
|
initial_weight = team_registration.initial_weight() |
|
|
|
initial_weight = team_registration.initial_weight() |
|
|
|
date = team_registration.registration_date |
|
|
|
date = team_registration.registration_date |
|
|
|
team = TeamList(names, weight, date, initial_weight, team_registration.logo) |
|
|
|
team = TeamList(names, weight, date, initial_weight, team_registration.logo) |
|
|
|
|
|
|
|
if team_registration.group_stage_position is not None: |
|
|
|
|
|
|
|
team.set_stage("Poule") |
|
|
|
|
|
|
|
elif team_registration.bracket_position is not None: |
|
|
|
|
|
|
|
team.set_stage("Tableau") |
|
|
|
|
|
|
|
else: |
|
|
|
team.set_stage("Attente") |
|
|
|
team.set_stage("Attente") |
|
|
|
|
|
|
|
|
|
|
|
teams.append(team) |
|
|
|
teams.append(team) |
|
|
|
if team_registration.wild_card_bracket: |
|
|
|
if team_registration.wild_card_bracket: |
|
|
|
wildcard_bracket.append(team) |
|
|
|
wildcard_bracket.append(team) |
|
|
|
@ -303,9 +309,11 @@ class Tournament(models.Model): |
|
|
|
group_stage_teams.sort(key=lambda s: s.weight) |
|
|
|
group_stage_teams.sort(key=lambda s: s.weight) |
|
|
|
|
|
|
|
|
|
|
|
for team in bracket_teams: |
|
|
|
for team in bracket_teams: |
|
|
|
|
|
|
|
if team.stage == "Attente": |
|
|
|
team.set_stage("Tableau") |
|
|
|
team.set_stage("Tableau") |
|
|
|
|
|
|
|
|
|
|
|
for team in group_stage_teams: |
|
|
|
for team in group_stage_teams: |
|
|
|
|
|
|
|
if team.stage == "Attente": |
|
|
|
team.set_stage("Poule") |
|
|
|
team.set_stage("Poule") |
|
|
|
|
|
|
|
|
|
|
|
for team in waiting_teams: |
|
|
|
for team in waiting_teams: |
|
|
|
|