From fdb8472ebb42a98477e89ed1cca2842cbe630313 Mon Sep 17 00:00:00 2001 From: Razmig Sarkissian Date: Sun, 19 May 2024 11:06:39 +0200 Subject: [PATCH] add court count back to club --- ...ourt_count_alter_tournament_court_count.py | 23 +++++++++++++++++++ tournaments/models/club.py | 2 ++ tournaments/models/tournament.py | 2 +- 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 tournaments/migrations/0051_club_court_count_alter_tournament_court_count.py diff --git a/tournaments/migrations/0051_club_court_count_alter_tournament_court_count.py b/tournaments/migrations/0051_club_court_count_alter_tournament_court_count.py new file mode 100644 index 0000000..964f56b --- /dev/null +++ b/tournaments/migrations/0051_club_court_count_alter_tournament_court_count.py @@ -0,0 +1,23 @@ +# Generated by Django 4.2.11 on 2024-05-19 09:05 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('tournaments', '0050_alter_tournament_team_sorting'), + ] + + operations = [ + migrations.AddField( + model_name='club', + name='court_count', + field=models.IntegerField(default=2), + ), + migrations.AlterField( + model_name='tournament', + name='court_count', + field=models.IntegerField(default=2), + ), + ] diff --git a/tournaments/models/club.py b/tournaments/models/club.py index ddfb821..4614836 100644 --- a/tournaments/models/club.py +++ b/tournaments/models/club.py @@ -16,6 +16,8 @@ class Club(models.Model): latitude = models.FloatField(null=True, blank=True) longitude = models.FloatField(null=True, blank=True) + court_count = models.IntegerField(default=2) + def __str__(self): return self.name diff --git a/tournaments/models/tournament.py b/tournaments/models/tournament.py index 66d7673..efab121 100644 --- a/tournaments/models/tournament.py +++ b/tournaments/models/tournament.py @@ -38,7 +38,7 @@ class Tournament(models.Model): #seed_count = models.IntegerField(default=0) closed_registration_date = models.DateTimeField(null=True, blank=True) group_stage_additional_qualified = models.IntegerField(default=0) - court_count = models.IntegerField(default=1) + court_count = models.IntegerField(default=2) prioritize_club_members = models.BooleanField() qualified_per_group_stage = models.IntegerField(default=0) teams_per_group_stage = models.IntegerField(default=0)