diff --git a/tournaments/templates/tournaments/tournaments.html b/tournaments/templates/tournaments/tournaments.html
index 10ca204..5c1facf 100644
--- a/tournaments/templates/tournaments/tournaments.html
+++ b/tournaments/templates/tournaments/tournaments.html
@@ -23,9 +23,15 @@
{% include 'tournaments/tournament_row.html' %}
{% endfor %}
+ {% if live|length > 10 %}
+ {% endif %}
{% endif %}
@@ -37,9 +43,15 @@
{% include 'tournaments/tournament_row.html' %}
{% endfor %}
+ {% if future|length > 10 %}
+ {% endif %}
{% endif %}
@@ -58,9 +70,15 @@
{% include 'tournaments/tournament_row.html' %}
{% endfor %}
+ {% if ended|length > 10 %}
+ {% endif %}
diff --git a/tournaments/views.py b/tournaments/views.py
index b71c44d..1a25bb4 100644
--- a/tournaments/views.py
+++ b/tournaments/views.py
@@ -26,6 +26,10 @@ def index(request):
live = live_tournaments(club_id)
finished = finished_tournaments(club_id)
+ club = None
+ if club_id:
+ club = get_object_or_404(Club, pk=club_id)
+
return render(
request,
"tournaments/tournaments.html",
@@ -87,7 +91,7 @@ def tournaments(request):
{
'tournaments': tournaments,
'title': title,
- 'club': club,
+ 'club': club_id,
}
)