|
|
|
@ -2,7 +2,7 @@ from django.shortcuts import render, get_object_or_404 |
|
|
|
from django.http import HttpResponse |
|
|
|
from django.http import HttpResponse |
|
|
|
from .serializers import ClubSerializer, TournamentSerializer, UserSerializer, ChangePasswordSerializer, EventSerializer, RoundSerializer, GroupStageSerializer, MatchSerializer, TeamScoreSerializer, TeamRegistrationSerializer, PlayerRegistrationSerializer, LiveMatchSerializer |
|
|
|
from .serializers import ClubSerializer, TournamentSerializer, UserSerializer, ChangePasswordSerializer, EventSerializer, RoundSerializer, GroupStageSerializer, MatchSerializer, TeamScoreSerializer, TeamRegistrationSerializer, PlayerRegistrationSerializer, LiveMatchSerializer |
|
|
|
from .models import Club, Tournament, CustomUser, Event, Round, GroupStage, Match, TeamScore, TeamRegistration, PlayerRegistration |
|
|
|
from .models import Club, Tournament, CustomUser, Event, Round, GroupStage, Match, TeamScore, TeamRegistration, PlayerRegistration |
|
|
|
from .models import TeamCall |
|
|
|
from .models import TeamSummon |
|
|
|
|
|
|
|
|
|
|
|
from rest_framework import viewsets, permissions |
|
|
|
from rest_framework import viewsets, permissions |
|
|
|
from rest_framework.authtoken.models import Token |
|
|
|
from rest_framework.authtoken.models import Token |
|
|
|
@ -65,14 +65,14 @@ def tournament(request, tournament_id): |
|
|
|
# } |
|
|
|
# } |
|
|
|
# return HttpResponse(template.render(context, request)) |
|
|
|
# return HttpResponse(template.render(context, request)) |
|
|
|
|
|
|
|
|
|
|
|
def tournament_planning(request, tournament_id): |
|
|
|
def tournament_summons(request, tournament_id): |
|
|
|
|
|
|
|
|
|
|
|
tournament = get_object_or_404(Tournament, pk=tournament_id) |
|
|
|
tournament = get_object_or_404(Tournament, pk=tournament_id) |
|
|
|
team_calls = tournament.team_calls() |
|
|
|
team_summons = tournament.team_summons() |
|
|
|
|
|
|
|
|
|
|
|
template = loader.get_template('tournaments/summons.html') |
|
|
|
template = loader.get_template('tournaments/summons.html') |
|
|
|
context = { |
|
|
|
context = { |
|
|
|
'team_calls': team_calls, |
|
|
|
'team_summons': team_summons, |
|
|
|
} |
|
|
|
} |
|
|
|
return HttpResponse(template.render(context, request)) |
|
|
|
return HttpResponse(template.render(context, request)) |
|
|
|
|
|
|
|
|
|
|
|
|