Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Validata
validata-ui
Commits
695604b1
Commit
695604b1
authored
Nov 30, 2018
by
Pierre Dittgen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PDF report filename fix
parent
faadeb0d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
validata_ui/views.py
validata_ui/views.py
+2
-2
No files found.
validata_ui/views.py
View file @
695604b1
...
...
@@ -296,8 +296,8 @@ def pdf_report(val_code):
tmp_pdf_report
.
unlink
()
return
redirect
(
url_for
(
'scdl_validator'
,
val_code
=
val_code
))
pdf_filename
=
'
r
apport de validation {} {}'
.
format
(
val_code
,
datetime
.
now
().
strftime
(
'%
Y
-%m-%
d
%Hh%M'
))
pdf_filename
=
'
R
apport de validation {} {}
.pdf
'
.
format
(
val_code
,
datetime
.
now
().
strftime
(
'%
d
-%m-%
Y
%Hh%M'
))
response
=
make_response
(
tmp_pdf_report
.
read_bytes
())
response
.
headers
.
set
(
'Content-disposition'
,
'attachment'
,
filename
=
pdf_filename
)
response
.
headers
.
set
(
'Content-type'
,
'application/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