Fix broken index

clubs
Laurent 2 years ago
parent 26a5ecf2c9
commit df1388daf7
  1. 5
      tournaments/models/tournament.py
  2. 9
      tournaments/templates/tournaments/base.html
  3. 2
      tournaments/templates/tournaments/group_stages.html
  4. 2
      tournaments/templates/tournaments/matches.html
  5. 2
      tournaments/templates/tournaments/summons.html
  6. 10
      tournaments/templates/tournaments/tournament_navigation.html

@ -80,7 +80,7 @@ class Tournament(models.Model):
else:
matches = self.all_matches()
matches = [m for m in matches if m.broadcasted==True]
# matches = [m for m in matches if m.broadcasted==True]
if not broadcasted:
matches = [m for m in matches if len(m.team_scores.all()) > 0]
@ -101,8 +101,6 @@ class Tournament(models.Model):
def group_stage_matches(self, group_stage_id):
group_stage = self.groupstage_set.filter(id=group_stage_id).first()
print(group_stage.name())
print(len(group_stage.match_set.all()))
return group_stage.match_set.all()
def round_matches(self, round_id):
@ -111,7 +109,6 @@ class Tournament(models.Model):
def live_group_stages(self):
return [gs.live_group_stages() for gs in self.groupstage_set.all()]
# return map(lambda gs: gs.live_group_stages(), self.groupstage_set.all())
class TeamSummon:
def __init__(self, names, date, weight, stage, image):

@ -41,15 +41,6 @@
</div>
</header>
<nav class="margin10">
<a href="{% url 'tournament' tournament.id %}" class="mybox">Matches</a>
<a href="{% url 'group-stages' tournament.id %}" class="mybox">Poules</a>
{% if tournament.in_progress %}
<a href="{% url 'tournament-summons' tournament.id %}" class="mybox">Convocations</a>
{% endif %}
</nav>
<main>
<!-- Content -->

@ -6,6 +6,8 @@
{% block content %}
{% include 'tournaments/tournament_navigation.html' %}
<div class="grid-x">
{% for group_stage in group_stages %}
{% include 'tournaments/group_stage_cell.html' %}

@ -6,6 +6,8 @@
{% block content %}
{% include 'tournaments/tournament_navigation.html' %}
{% if rounds or group_stages %}
<nav class="margin10 top-margin20">
<a href="{% url 'tournament' tournament.id %}" class="mybox">Tous les matchs</a>

@ -8,6 +8,8 @@
{% load static %}
{% include 'tournaments/tournament_navigation.html' %}
{% if team_summons %}
<div class="grid-x padding-bottom">

@ -0,0 +1,10 @@
<nav class="margin10">
<a href="{% url 'tournament' tournament.id %}" class="mybox">Matches</a>
<a href="{% url 'group-stages' tournament.id %}" class="mybox">Poules</a>
{% if tournament.in_progress %}
<a href="{% url 'tournament-summons' tournament.id %}" class="mybox">Convocations</a>
{% endif %}
</nav>
Loading…
Cancel
Save