1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2024-11-30 06:53:02 +00:00
plateforme-tfjm2/tfjm/context_processors.py

24 lines
888 B
Python
Raw Normal View History

# Copyright (C) 2024 by Animath
# SPDX-License-Identifier: GPL-3.0-or-later
from django.conf import settings
from participation.models import Tournament
def tfjm_context(request):
return {
'TFJM': {
'APP': settings.TFJM_APP,
'APP_NAME': settings.APP_NAME,
'NB_ROUNDS': settings.NB_ROUNDS,
'ML_MANAGEMENT': settings.ML_MANAGEMENT,
'PAYMENT_MANAGEMENT': settings.PAYMENT_MANAGEMENT,
'SINGLE_TOURNAMENT':
Tournament.objects.first() if Tournament.objects.exists() and settings.TFJM_APP else None,
'HEALTH_SHEET_REQUIRED': settings.HEALTH_SHEET_REQUIRED,
'VACCINE_SHEET_REQUIRED': settings.VACCINE_SHEET_REQUIRED,
'MOTIVATION_LETTER_REQUIRED': settings.MOTIVATION_LETTER_REQUIRED,
'SUGGEST_ANIMATH': settings.SUGGEST_ANIMATH,
}
}