mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-25 18:44:23 +00:00
Fix for etickets
This commit is contained in:
parent
ba86219b74
commit
c9005e2c31
@ -1019,7 +1019,8 @@ class EticketPDFView(CanViewMixin, DetailView):
|
|||||||
self.object = self.get_object()
|
self.object = self.get_object()
|
||||||
eticket = self.object.product.eticket
|
eticket = self.object.product.eticket
|
||||||
user = self.object.customer.user
|
user = self.object.customer.user
|
||||||
code = "%s %s %s" % (self.object.customer.user.id, self.object.product.id, self.object.quantity)
|
print(self.object)
|
||||||
|
code = "%s %s %s %s" % (self.object.customer.user.id, self.object.product.id, self.object.id, self.object.quantity)
|
||||||
code += " " + eticket.get_hash(code)[:8].upper()
|
code += " " + eticket.get_hash(code)[:8].upper()
|
||||||
response = HttpResponse(content_type='application/pdf')
|
response = HttpResponse(content_type='application/pdf')
|
||||||
response['Content-Disposition'] = 'filename="eticket.pdf"'
|
response['Content-Disposition'] = 'filename="eticket.pdf"'
|
||||||
|
Loading…
Reference in New Issue
Block a user