1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-06-22 01:18:27 +02:00

Adapt platform to have 3 rounds (untested)

Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
Emmy D'Anello
2024-06-07 15:48:52 +02:00
parent ec2fa43e20
commit 38ceef7a54
9 changed files with 440 additions and 302 deletions

View File

@ -14,6 +14,7 @@ from django.utils.translation import gettext_lazy as _
import pandas
from pypdf import PdfReader
from registration.models import VolunteerRegistration
from tfjm import settings
from .models import Note, Participation, Passage, Pool, Solution, Synthesis, Team, Tournament
@ -125,6 +126,12 @@ class ValidateParticipationForm(forms.Form):
class TournamentForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
if settings.TFJM_APP != "ETEAM":
del self.fields['solutions_available_third_phase']
del self.fields['syntheses_third_phase_limit']
class Meta:
model = Tournament
exclude = ('notes_sheet_id', )
@ -136,10 +143,10 @@ class TournamentForm(forms.ModelForm):
'solutions_draw': forms.DateTimeInput(attrs={'type': 'datetime-local'}, format='%Y-%m-%d %H:%M'),
'syntheses_first_phase_limit': forms.DateTimeInput(attrs={'type': 'datetime-local'},
format='%Y-%m-%d %H:%M'),
'solutions_available_second_phase': forms.DateTimeInput(attrs={'type': 'datetime-local'},
format='%Y-%m-%d %H:%M'),
'syntheses_second_phase_limit': forms.DateTimeInput(attrs={'type': 'datetime-local'},
format='%Y-%m-%d %H:%M'),
'syntheses_third_phase_limit': forms.DateTimeInput(attrs={'type': 'datetime-local'},
format='%Y-%m-%d %H:%M'),
'organizers': forms.SelectMultiple(attrs={
'class': 'selectpicker',
'data-live-search': 'true',