Compare commits

...

3 Commits

Author SHA1 Message Date
Emmy D'Anello 65c6158b52
TFJM² has not a single tournament
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
2024-10-21 19:20:46 +02:00
Emmy D'Anello 4a5f48a834
Fix single tournament render
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
2024-10-21 19:17:03 +02:00
Emmy D'Anello 4ab706d219
Fix TFJM_settings dictionary
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
2024-10-21 19:09:24 +02:00
4 changed files with 7 additions and 6 deletions

View File

@ -18,11 +18,12 @@ def tfjm_context(request):
'ML_MANAGEMENT': settings.ML_MANAGEMENT, 'ML_MANAGEMENT': settings.ML_MANAGEMENT,
'PAYMENT_MANAGEMENT': settings.PAYMENT_MANAGEMENT, 'PAYMENT_MANAGEMENT': settings.PAYMENT_MANAGEMENT,
'RECOMMENDED_SOLUTIONS_COUNT': settings.RECOMMENDED_SOLUTIONS_COUNT, 'RECOMMENDED_SOLUTIONS_COUNT': settings.RECOMMENDED_SOLUTIONS_COUNT,
'SINGLE_TOURNAMENT': 'SINGLE_TOURNAMENT': settings.SINGLE_TOURNAMENT,
Tournament.objects.first() if Tournament.objects.exists() and settings.SINGLE_TOURNAMENT else None,
'HEALTH_SHEET_REQUIRED': settings.HEALTH_SHEET_REQUIRED, 'HEALTH_SHEET_REQUIRED': settings.HEALTH_SHEET_REQUIRED,
'VACCINE_SHEET_REQUIRED': settings.VACCINE_SHEET_REQUIRED, 'VACCINE_SHEET_REQUIRED': settings.VACCINE_SHEET_REQUIRED,
'MOTIVATION_LETTER_REQUIRED': settings.MOTIVATION_LETTER_REQUIRED, 'MOTIVATION_LETTER_REQUIRED': settings.MOTIVATION_LETTER_REQUIRED,
'SUGGEST_ANIMATH': settings.SUGGEST_ANIMATH, 'SUGGEST_ANIMATH': settings.SUGGEST_ANIMATH,
} },
'TFJM_TOURNAMENT':
Tournament.objects.first() if Tournament.objects.exists() and settings.SINGLE_TOURNAMENT else None,
} }

View File

@ -355,7 +355,7 @@ if TFJM_APP == "TFJM":
HAS_FINAL = True HAS_FINAL = True
ML_MANAGEMENT = True ML_MANAGEMENT = True
PAYMENT_MANAGEMENT = True PAYMENT_MANAGEMENT = True
SINGLE_TOURNAMENT = True SINGLE_TOURNAMENT = False
HEALTH_SHEET_REQUIRED = True HEALTH_SHEET_REQUIRED = True
VACCINE_SHEET_REQUIRED = True VACCINE_SHEET_REQUIRED = True
MOTIVATION_LETTER_REQUIRED = True MOTIVATION_LETTER_REQUIRED = True

View File

@ -94,7 +94,7 @@
{% javascript 'main' %} {% javascript 'main' %}
{{ TFJM|json_script:TFJM_settings }} {{ TFJM|json_script:'TFJM_settings' }}
<script> <script>
const CSRF_TOKEN = "{{ csrf_token }}" const CSRF_TOKEN = "{{ csrf_token }}"

View File

@ -18,7 +18,7 @@
</li> </li>
<li class="nav-item active"> <li class="nav-item active">
{% if TFJM.SINGLE_TOURNAMENT %} {% if TFJM.SINGLE_TOURNAMENT %}
<a href="{% url 'participation:tournament_detail' pk=TFJM.SINGLE_TOURNAMENT.pk %}" class="nav-link"> <a href="{% url 'participation:tournament_detail' pk=TFJM_TOURNAMENT.pk %}" class="nav-link">
<i class="fas fa-calendar-day"></i> {% trans "Tournament" %} <i class="fas fa-calendar-day"></i> {% trans "Tournament" %}
</a> </a>
{% else %} {% else %}