Allow accessing URL to generate boarding pass
Only needed some code fixups to function
This commit is contained in:
parent
568536532c
commit
5a085535c0
1 changed files with 6 additions and 3 deletions
9
vendor/regidesk/regidesk/views.py
vendored
9
vendor/regidesk/regidesk/views.py
vendored
|
@ -52,7 +52,8 @@ def boardingpass(request):
|
||||||
'default template to use. This page has similar information to '
|
'default template to use. This page has similar information to '
|
||||||
'the boarding pass - please check back later.')
|
'the boarding pass - please check back later.')
|
||||||
return redirect('/tickets/review')
|
return redirect('/tickets/review')
|
||||||
prepare_boarding_pass(request, templates[0])
|
prepare_boarding_pass(request.user, templates[0])
|
||||||
|
checkin = CheckIn.objects.get_or_create(user=user)[0]
|
||||||
|
|
||||||
boardingpass = checkin.boardingpass
|
boardingpass = checkin.boardingpass
|
||||||
qrcode_url = request.build_absolute_uri(reverse("regidesk:checkin_png", args=[checkin.code]))
|
qrcode_url = request.build_absolute_uri(reverse("regidesk:checkin_png", args=[checkin.code]))
|
||||||
|
@ -81,7 +82,9 @@ def boarding_overview(request, boarding_state="pending"):
|
||||||
price__gte=0
|
price__gte=0
|
||||||
)
|
)
|
||||||
|
|
||||||
ticketholders = { ticket.invoice.user: ticket.product.name for ticket in tickets }
|
print(datetime.now())
|
||||||
|
ticketholders = ( ticket.invoice.user for ticket in tickets )
|
||||||
|
print(datetime.now())
|
||||||
|
|
||||||
attendees = people.Attendee.objects.select_related(
|
attendees = people.Attendee.objects.select_related(
|
||||||
"attendeeprofilebase",
|
"attendeeprofilebase",
|
||||||
|
@ -194,7 +197,7 @@ def prepare_boarding_pass(user, template, attendee=None):
|
||||||
if attendee:
|
if attendee:
|
||||||
user = attendee.user
|
user = attendee.user
|
||||||
else:
|
else:
|
||||||
user = request.user
|
user = user
|
||||||
attendee=user.attendee
|
attendee=user.attendee
|
||||||
checkin = CheckIn.objects.get_or_create(user=user)
|
checkin = CheckIn.objects.get_or_create(user=user)
|
||||||
ctx = {
|
ctx = {
|
||||||
|
|
Loading…
Reference in a new issue