diff --git a/tournaments/static/tournaments/css/style.css b/tournaments/static/tournaments/css/style.css
index 0eb1728..f1a53c3 100644
--- a/tournaments/static/tournaments/css/style.css
+++ b/tournaments/static/tournaments/css/style.css
@@ -153,6 +153,9 @@ tr {
font-size: 18px;
/* color: #707070; */
}
+.semibold {
+ font-weight: 600;
+}
.info {
font-family: "Montserrat-SemiBold";
@@ -431,7 +434,7 @@ tr {
.table-row-5-colums {
display: grid;
- grid-template-columns: 60px auto 60px 60px 130px;
+ grid-template-columns: 60px auto 50px 70px 130px;
align-items: center; /* Vertically center the content within each column */
padding: 5px 0px;
}
diff --git a/tournaments/templates/tournaments/match_cell.html b/tournaments/templates/tournaments/match_cell.html
index 0b837fe..4516f3c 100644
--- a/tournaments/templates/tournaments/match_cell.html
+++ b/tournaments/templates/tournaments/match_cell.html
@@ -21,7 +21,7 @@
{% for name in team.names %}
-
+
{{ name }}
{% endfor %}
diff --git a/tournaments/templates/tournaments/summon_row.html b/tournaments/templates/tournaments/summon_row.html
index 41805e5..8b934b8 100644
--- a/tournaments/templates/tournaments/summon_row.html
+++ b/tournaments/templates/tournaments/summon_row.html
@@ -5,13 +5,13 @@
-
+
{% for name in summon.names %}
{{ name }}
{% endfor %}
{{ summon.weight }}
-
{{ summon.date|date:'H:i' }}
+
{{ summon.date|date:'H:i' }}
diff --git a/tournaments/templates/tournaments/tournament_row.html b/tournaments/templates/tournaments/tournament_row.html
index 3d26ad8..472852e 100644
--- a/tournaments/templates/tournaments/tournament_row.html
+++ b/tournaments/templates/tournaments/tournament_row.html
@@ -5,7 +5,7 @@
{{ tournament.level }}
{{ tournament.category }}
- {{ tournament.event.club.name }}
+ {{ tournament.event.club.name }}
{{ tournament.formatted_start_date }}
diff --git a/tournaments/views.py b/tournaments/views.py
index cdeb226..ab11f78 100644
--- a/tournaments/views.py
+++ b/tournaments/views.py
@@ -20,13 +20,6 @@ def index(request):
future_tournaments = Tournament.objects.filter(end_date__isnull=True, start_date__gt=today).order_by('start_date')
live_tournaments = Tournament.objects.filter(end_date__isnull=True, start_date__lte=today).order_by('start_date')
ended_tournaments = Tournament.objects.filter(end_date__isnull=False).order_by('start_date')
- # template = loader.get_template('tournaments/tournaments.html')
- # context = {
- # 'future': future_tournaments,
- # 'live': live_tournaments,
- # 'ended': ended_tournaments,
- # }
- # return HttpResponse(template.render(context, request))
return render(
request,
"tournaments/tournaments.html",
@@ -34,8 +27,7 @@ def index(request):
'future': future_tournaments,
'live': live_tournaments,
'ended': ended_tournaments,
- },
- content_type="text/html",
+ }
)
def tournament(request, tournament_id):
@@ -43,39 +35,18 @@ def tournament(request, tournament_id):
tournament = get_object_or_404(Tournament, pk=tournament_id)
live_matches = list(tournament.live_matches())
- template = loader.get_template('tournaments/matches.html')
- context = {
+ return render(request, 'tournaments/matches.html', {
'matches': live_matches,
- }
- return HttpResponse(template.render(context, request))
-
-# def tournament(request, tournament_id):
-
-# tournament = get_object_or_404(Tournament, pk=tournament_id)
-# today = date.today()
-
-# future_matches = Match.objects.filter(end_date__isnull=True, start_date__gt=today).order_by('start_date')
-# live_matches = Match.objects.filter(end_date__isnull=True, start_date__lte=today).order_by('start_date')
-# ended_matches = Match.objects.filter(end_date__isnull=False).order_by('start_date')
-# template = loader.get_template('tournaments/tournament.html')
-# context = {
-# 'future': future_matches,
-# 'live': live_matches,
-# 'ended': ended_matches,
-# }
-# return HttpResponse(template.render(context, request))
+ })
def tournament_summons(request, tournament_id):
tournament = get_object_or_404(Tournament, pk=tournament_id)
team_summons = tournament.team_summons()
- template = loader.get_template('tournaments/summons.html')
- context = {
+ return render(request, 'tournaments/summons.html', {
'team_summons': team_summons,
- }
- return HttpResponse(template.render(context, request))
-
+ })
def tournament_json(request, tournament_id):
tournament = get_object_or_404(Tournament, pk=tournament_id)
@@ -83,17 +54,6 @@ def tournament_json(request, tournament_id):
data = json.dumps(live_matches, default=vars)
return HttpResponse(data, content_type='application/json')
-# def index(request):
-# club = Club.objects.first()
-# live_matches = Match.objects.filter(enddate__isnull=True).order_by('court')
-# ended_matches = Match.objects.filter(enddate__isnull=False).order_by('court')
-# template = loader.get_template('scores/index.html')
-# context = {
-# 'club': club,
-# 'live_matches': live_matches,
-# 'ended_matches': ended_matches,
-# }
-# return HttpResponse(template.render(context, request))
@api_view(['GET'])
def user_by_token(request):