plateforme-tfjm2/tfjm/context_processors.py

20 lines
724 B
Python
Raw Normal View History

from django.conf import settings
from participation.models import Tournament
def tfjm_context(request):
return {
'TFJM': {
'APP': settings.TFJM_APP,
'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,
}
}