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

Make Sympa + payment support optional

Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
Emmy D'Anello
2024-06-07 16:35:08 +02:00
parent 2a775cedc1
commit c12972b718
10 changed files with 56 additions and 25 deletions

View File

@ -128,10 +128,12 @@ class ValidateParticipationForm(forms.Form):
class TournamentForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
if settings.TFJM_APP != "ETEAM":
if settings.NB_ROUNDS < 3:
del self.fields['date_third_phase']
del self.fields['solutions_available_third_phase']
del self.fields['syntheses_third_phase_limit']
if not settings.PAYMENT_MANAGEMENT:
del self.fields['price']
class Meta:
model = Tournament