Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
AE UTBM
Sith
Commits
c9005e2c
Commit
c9005e2c
authored
Oct 15, 2016
by
Sli
Browse files
Fix for etickets
parent
ba86219b
Pipeline
#297
failed with stage
in 3 minutes and 46 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
counter/views.py
View file @
c9005e2c
...
...
@@ -1019,7 +1019,8 @@ class EticketPDFView(CanViewMixin, DetailView):
self
.
object
=
self
.
get_object
()
eticket
=
self
.
object
.
product
.
eticket
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
()
response
=
HttpResponse
(
content_type
=
'application/pdf'
)
response
[
'Content-Disposition'
]
=
'filename="eticket.pdf"'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment