From d279e28a18f9cecc816e69088d87091fec3de11a Mon Sep 17 00:00:00 2001 From: Razmig Sarkissian Date: Fri, 11 Aug 2023 16:14:53 +0200 Subject: [PATCH] fix --- scores/migrations/0024_alter_match_teams.py | 18 ++++++++++++++++++ scores/models.py | 2 +- scores/static/scores/style.css | 2 +- scores/templates/scores/match.html | 4 +++- 4 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 scores/migrations/0024_alter_match_teams.py diff --git a/scores/migrations/0024_alter_match_teams.py b/scores/migrations/0024_alter_match_teams.py new file mode 100644 index 0000000..faa6954 --- /dev/null +++ b/scores/migrations/0024_alter_match_teams.py @@ -0,0 +1,18 @@ +# Generated by Django 4.2 on 2023-08-11 14:14 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('scores', '0023_match_teams_player'), + ] + + operations = [ + migrations.AlterField( + model_name='match', + name='teams', + field=models.ManyToManyField(blank=True, to='scores.team'), + ), + ] diff --git a/scores/models.py b/scores/models.py index 989c765..f72a7ba 100644 --- a/scores/models.py +++ b/scores/models.py @@ -89,7 +89,7 @@ class Match(models.Model): team2scorecolumn4 = models.CharField(max_length=200, blank=True) team2scorecolumn5 = models.CharField(max_length=200, blank=True) - teams = models.ManyToManyField(Team) + teams = models.ManyToManyField(Team, blank=True) def poule(self): return self.court / 100 diff --git a/scores/static/scores/style.css b/scores/static/scores/style.css index f2dec56..cf78158 100644 --- a/scores/static/scores/style.css +++ b/scores/static/scores/style.css @@ -80,7 +80,7 @@ td { width: 60px; font-size: 150%; text-align: center; - vertical-align:auto; + vertical-align: middle; } .bigscore { diff --git a/scores/templates/scores/match.html b/scores/templates/scores/match.html index a114825..7762bc6 100644 --- a/scores/templates/scores/match.html +++ b/scores/templates/scores/match.html @@ -103,6 +103,8 @@ + + {% if match.teams.all|length == 2 %}
@@ -133,7 +135,7 @@
- + {% endif %}