From 964f3e243da2888ce759a198be7b4d8d8362e5e3 Mon Sep 17 00:00:00 2001 From: Raz Date: Wed, 4 Dec 2024 09:12:56 +0100 Subject: [PATCH] little fixes for online reg --- tournaments/templates/register_tournament.html | 1 - tournaments/views.py | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tournaments/templates/register_tournament.html b/tournaments/templates/register_tournament.html index d77b197..fd723ab 100644 --- a/tournaments/templates/register_tournament.html +++ b/tournaments/templates/register_tournament.html @@ -54,7 +54,6 @@ {% if current_players|length < 2 %}
- {% csrf_token %} {% if user_without_licence and tournament.license_is_required %}
diff --git a/tournaments/views.py b/tournaments/views.py index 56dac3d..c64c6fb 100644 --- a/tournaments/views.py +++ b/tournaments/views.py @@ -593,6 +593,9 @@ def profile(request): 'user_name': user.username }) +from django.views.decorators.csrf import csrf_protect + +@csrf_protect def register_tournament(request, tournament_id): tournament = get_object_or_404(Tournament, id=tournament_id) registration_successful = False # Flag for registration status