From bf6f87ee897ba99aa56e85c2a56387bf8bc79f78 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Thu, 31 Dec 2020 12:26:49 +0100 Subject: [PATCH] Indicate the maximum amount of teams in a tournament --- .../migrations/0003_tournament_max_teams.py | 18 ++++++++++++++++++ apps/participation/models.py | 5 +++++ 2 files changed, 23 insertions(+) create mode 100644 apps/participation/migrations/0003_tournament_max_teams.py diff --git a/apps/participation/migrations/0003_tournament_max_teams.py b/apps/participation/migrations/0003_tournament_max_teams.py new file mode 100644 index 0000000..1b682b5 --- /dev/null +++ b/apps/participation/migrations/0003_tournament_max_teams.py @@ -0,0 +1,18 @@ +# Generated by Django 3.0.11 on 2020-12-31 11:25 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('participation', '0002_auto_20201230_1302'), + ] + + operations = [ + migrations.AddField( + model_name='tournament', + name='max_teams', + field=models.PositiveSmallIntegerField(default=9, verbose_name='max team count'), + ), + ] diff --git a/apps/participation/models.py b/apps/participation/models.py index 43482c2..f81dcda 100644 --- a/apps/participation/models.py +++ b/apps/participation/models.py @@ -138,6 +138,11 @@ class Tournament(models.Model): verbose_name=_("place"), ) + max_teams = models.PositiveSmallIntegerField( + verbose_name=_("max team count"), + default=9, + ) + inscription_limit = models.DateTimeField( verbose_name=_("limit date for registrations"), default=timezone.now,