|
|
|
|
@ -36,7 +36,7 @@ def index(request): |
|
|
|
|
|
|
|
|
|
def tournament(request, tournament_id): |
|
|
|
|
tournament = get_object_or_404(Tournament, pk=tournament_id) |
|
|
|
|
live_matches = list(tournament.live_matches()) |
|
|
|
|
live_matches = list(tournament.live_matches(broadcasted=False)) |
|
|
|
|
return render(request, 'tournaments/matches.html', { |
|
|
|
|
'tournament': tournament, |
|
|
|
|
'matches': live_matches, |
|
|
|
|
@ -78,7 +78,7 @@ def tournament_matches(request, tournament_id): |
|
|
|
|
|
|
|
|
|
def tournament_matches_json(request, tournament_id): |
|
|
|
|
tournament = get_object_or_404(Tournament, pk=tournament_id) |
|
|
|
|
live_matches = tournament.live_matches() |
|
|
|
|
live_matches = tournament.live_matches(broadcasted=True) |
|
|
|
|
data = json.dumps(live_matches, default=vars) |
|
|
|
|
return HttpResponse(data, content_type='application/json') |
|
|
|
|
|
|
|
|
|
|