2024-06-07 22:19:33 +00:00
|
|
|
# Copyright (C) 2024 by Animath
|
|
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
2024-06-07 11:51:24 +00:00
|
|
|
|
2024-06-07 22:19:33 +00:00
|
|
|
from django.conf import settings
|
2024-06-07 13:18:59 +00:00
|
|
|
from participation.models import Tournament
|
|
|
|
|
2024-06-07 11:51:24 +00:00
|
|
|
|
|
|
|
def tfjm_context(request):
|
|
|
|
return {
|
2024-06-07 14:35:08 +00:00
|
|
|
'TFJM': {
|
|
|
|
'APP': settings.TFJM_APP,
|
2024-06-07 22:19:33 +00:00
|
|
|
'APP_NAME': settings.APP_NAME,
|
2024-10-20 18:13:49 +00:00
|
|
|
'HAS_OBSERVER': settings.HAS_OBSERVER,
|
|
|
|
'HAS_FINAL': settings.HAS_FINAL,
|
|
|
|
'HOME_PAGE_LINK': settings.HOME_PAGE_LINK,
|
|
|
|
'LOGO_PATH': "static/tfjm/img/" + settings.LOGO_FILE,
|
2024-07-06 08:16:54 +00:00
|
|
|
'NB_ROUNDS': settings.NB_ROUNDS,
|
2024-06-07 14:35:08 +00:00
|
|
|
'ML_MANAGEMENT': settings.ML_MANAGEMENT,
|
|
|
|
'PAYMENT_MANAGEMENT': settings.PAYMENT_MANAGEMENT,
|
2024-10-20 18:13:49 +00:00
|
|
|
'RECOMMENDED_SOLUTIONS_COUNT': settings.RECOMMENDED_SOLUTIONS_COUNT,
|
2024-10-21 17:17:03 +00:00
|
|
|
'SINGLE_TOURNAMENT': settings.SINGLE_TOURNAMENT,
|
2024-06-07 15:20:06 +00:00
|
|
|
'HEALTH_SHEET_REQUIRED': settings.HEALTH_SHEET_REQUIRED,
|
|
|
|
'VACCINE_SHEET_REQUIRED': settings.VACCINE_SHEET_REQUIRED,
|
|
|
|
'MOTIVATION_LETTER_REQUIRED': settings.MOTIVATION_LETTER_REQUIRED,
|
2024-06-07 16:39:16 +00:00
|
|
|
'SUGGEST_ANIMATH': settings.SUGGEST_ANIMATH,
|
2024-10-21 17:17:03 +00:00
|
|
|
},
|
|
|
|
'TFJM_TOURNAMENT':
|
|
|
|
Tournament.objects.first() if Tournament.objects.exists() and settings.SINGLE_TOURNAMENT else None,
|
2024-06-07 11:51:24 +00:00
|
|
|
}
|