clubs
Laurent 2 years ago
parent 30c8f00c27
commit 153937ed08
  1. 14
      tournaments/models/group_stage.py
  2. 2
      tournaments/templates/tournaments/group_stage_cell.html

@ -70,10 +70,11 @@ class GroupStage(models.Model):
total1 = scores1[0] total1 = scores1[0]
total2 = scores2[0] total2 = scores2[0]
team1 = gs_teams[ts1.team_registration] if ts1.team_registration in gs_teams and ts2.team_registration in gs_teams:
team2 = gs_teams[ts2.team_registration] team1 = gs_teams[ts1.team_registration]
team1.diff = total1 - total2 team2 = gs_teams[ts2.team_registration]
team2.diff = total2 - total1 team1.diff = total1 - total2
team2.diff = total2 - total1
teams = sorted(gs_teams.values(), key=lambda t: t.position) teams = sorted(gs_teams.values(), key=lambda t: t.position)
for team in teams: for team in teams:
@ -116,7 +117,10 @@ class LiveGroupStage:
class GroupStageTeam: class GroupStageTeam:
def __init__(self, team_registration): def __init__(self, team_registration):
self.names = team_registration.team_names() self.names = team_registration.team_names()
self.position = team_registration.group_stage_position if team_registration.group_stage_position:
self.position = team_registration.group_stage_position
else:
self.position = 0
self.wins = 0 self.wins = 0
self.losses = 0 self.losses = 0
self.diff = 0 self.diff = 0

@ -15,7 +15,7 @@
<div class="table-row-2-colums bottom-border"> <div class="table-row-2-colums bottom-border">
<div class="table-cell table-cell-large"> <div class="table-cell table-cell-large">
{% for name in team.names %} {% for name in team.names %}
<div class="{% if team.is_winner %}winner{% endif %}"> <div class="semibold {% if team.is_winner %}winner{% endif %}">
{{ name }} {{ name }}
</div> </div>
{% endfor %} {% endfor %}

Loading…
Cancel
Save