diff --git a/scores/urls.py b/scores/urls.py index f9bbc5d..8fafaff 100644 --- a/scores/urls.py +++ b/scores/urls.py @@ -20,7 +20,8 @@ from . import views urlpatterns = [ path('match//', views.match, name='match'), - + path('tv/match//', views.match_tv, name='match'), + path('tv/club///equipes/', views.tv_teams_club_name_tournament, name='teams'), path('tv/tournoi//equipes/', views.tv_teams_tournament_name, name='teams'), path('tv/club///equipes/', views.tv_teams_club_name_tournament_name, name='teams'), diff --git a/scores/views.py b/scores/views.py index 687c861..a239813 100644 --- a/scores/views.py +++ b/scores/views.py @@ -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())