mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-06-21 03:58:26 +02:00
Store round dates
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
@ -129,6 +129,7 @@ class TournamentForm(forms.ModelForm):
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
if settings.TFJM_APP != "ETEAM":
|
||||
del self.fields['date_third_phase']
|
||||
del self.fields['solutions_available_third_phase']
|
||||
del self.fields['syntheses_third_phase_limit']
|
||||
|
||||
|
@ -0,0 +1,35 @@
|
||||
# Generated by Django 5.0.6 on 2024-06-07 14:01
|
||||
|
||||
import datetime
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("participation", "0015_tournament_solutions_available_third_phase_and_more"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name="tournament",
|
||||
name="date_first_phase",
|
||||
field=models.DateField(
|
||||
default=datetime.date.today, verbose_name="first phase date"
|
||||
),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name="tournament",
|
||||
name="date_second_phase",
|
||||
field=models.DateField(
|
||||
default=datetime.date.today, verbose_name="first second date"
|
||||
),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name="tournament",
|
||||
name="date_third_phase",
|
||||
field=models.DateField(
|
||||
default=datetime.date.today, verbose_name="third phase date"
|
||||
),
|
||||
),
|
||||
]
|
@ -310,11 +310,21 @@ class Tournament(models.Model):
|
||||
default=timezone.now,
|
||||
)
|
||||
|
||||
date_first_phase = models.DateField(
|
||||
verbose_name=_("first phase date"),
|
||||
default=date.today,
|
||||
)
|
||||
|
||||
syntheses_first_phase_limit = models.DateTimeField(
|
||||
verbose_name=_("limit date to upload the syntheses for the first phase"),
|
||||
default=timezone.now,
|
||||
)
|
||||
|
||||
date_second_phase = models.DateField(
|
||||
verbose_name=_("first second date"),
|
||||
default=date.today,
|
||||
)
|
||||
|
||||
solutions_available_second_phase = models.BooleanField(
|
||||
verbose_name=_("check this case when solutions for the second round become available"),
|
||||
default=False,
|
||||
@ -325,6 +335,11 @@ class Tournament(models.Model):
|
||||
default=timezone.now,
|
||||
)
|
||||
|
||||
date_third_phase = models.DateField(
|
||||
verbose_name=_("third phase date"),
|
||||
default=date.today,
|
||||
)
|
||||
|
||||
solutions_available_third_phase = models.BooleanField(
|
||||
verbose_name=_("check this case when solutions for the third round become available"),
|
||||
default=False,
|
||||
|
@ -37,7 +37,7 @@
|
||||
|
||||
\Large {\bf \tfjmedition$^{e}$ Tournoi Fran\c cais des Jeunes Math\'ematiciennes et Math\'ematiciens \tfjm}\\
|
||||
\vspace{3mm}
|
||||
Tour {{ pool.round }} \;-- Poule {{ pool.get_letter_display }}{% if pool.participations.count == 5 %} \;-- {{ pool.get_room_display }}{% endif %} \;-- {% if pool.round == 1 %}{{ pool.tournament.date_start }}{% else %}{{ pool.tournament.date_end }}{% endif %}
|
||||
Tour {{ pool.round }} \;-- Poule {{ pool.get_letter_display }}{% if pool.participations.count == 5 %} \;-- {{ pool.get_room_display }}{% endif %} \;-- {% if pool.round == 1 %}{{ pool.tournament.date_first_phase }}{% elif pool.round == 2 %}{{ pool.tournament.date_second_phase }}{% else %}{{ pool.tournament.date_third_phase }}{% endif %}
|
||||
|
||||
|
||||
\vspace{15mm}
|
||||
|
Reference in New Issue
Block a user