little fixes for online reg

online_registration
Raz 11 months ago
parent 44ed67feee
commit 964f3e243d
  1. 1
      tournaments/templates/register_tournament.html
  2. 3
      tournaments/views.py

@ -54,7 +54,6 @@
<!-- Add Player Form --> <!-- Add Player Form -->
{% if current_players|length < 2 %} {% if current_players|length < 2 %}
<div> <div>
{% csrf_token %}
{% if user_without_licence and tournament.license_is_required %} {% if user_without_licence and tournament.license_is_required %}
<div class="semibold"> <div class="semibold">

@ -593,6 +593,9 @@ def profile(request):
'user_name': user.username 'user_name': user.username
}) })
from django.views.decorators.csrf import csrf_protect
@csrf_protect
def register_tournament(request, tournament_id): def register_tournament(request, tournament_id):
tournament = get_object_or_404(Tournament, id=tournament_id) tournament = get_object_or_404(Tournament, id=tournament_id)
registration_successful = False # Flag for registration status registration_successful = False # Flag for registration status

Loading…
Cancel
Save