main
Razmig Sarkissian 2 years ago
parent cb572e2b4e
commit 60ccddde41
  1. 3
      scores/urls.py
  2. 10
      scores/views.py

@ -20,7 +20,8 @@ from . import views
urlpatterns = [
path('match/<int:match_id>/', views.match, name='match'),
path('tv/match/<int:match_id>/', views.match_tv, name='match'),
path('tv/club/<str:club_name>/<int:tournament_id>/equipes/', views.tv_teams_club_name_tournament, name='teams'),
path('tv/tournoi/<str:tournament_shortname>/equipes/', views.tv_teams_tournament_name, name='teams'),
path('tv/club/<str:club_name>/<str:tournament_shortname>/equipes/', views.tv_teams_club_name_tournament_name, name='teams'),

@ -76,6 +76,16 @@ def match(request, match_id):
}
return HttpResponse(template.render(context, request))
def match_tv(request, match_id):
match = get_object_or_404(Match, pk=match_id)
template = loader.get_template('scores/match.html')
context = {
'match': match,
'tv': True,
}
return HttpResponse(template.render(context, request))
def teams_tournament_name(request, tournament_shortname):
tournament = get_object_or_404(Tournament, shortname__iexact=tournament_shortname.lower())

Loading…
Cancel
Save