bracket-feature
laurent 1 year ago
commit 93087f60db
  1. 9
      tournaments/views.py

@ -224,6 +224,10 @@ def qr_code_url(request, tournament_id):
qr_code_url = reverse('tournament', args=[tournament_id]) qr_code_url = reverse('tournament', args=[tournament_id])
return request.build_absolute_uri(qr_code_url) return request.build_absolute_uri(qr_code_url)
def qr_code_url_with_query(request, club_id):
url_with_query = f"{request.build_absolute_uri('/')}?club={str(club_id)}"
return url_with_query
def qr_code_options(): def qr_code_options():
return QRCodeOptions(size=10, border=4, error_correction='L') return QRCodeOptions(size=10, border=4, error_correction='L')
@ -346,7 +350,10 @@ def club_broadcast_auto(request, broadcast_code):
#print(tournament_ids) #print(tournament_ids)
return render(request, 'tournaments/broadcast/broadcasted_auto_event.html', { return render(request, 'tournaments/broadcast/broadcasted_auto_event.html', {
'tournament_ids': tournament_ids, 'tournament_ids': tournament_ids,
'club_name': club.name 'club_name': club.name,
'qr_code_url': qr_code_url_with_query(request, club.id),
'qr_code_options': qr_code_options(),
}) })
def download(request): def download(request):

Loading…
Cancel
Save