aboutsummaryrefslogtreecommitdiffstats
path: root/wkhtmltopdf
diff options
context:
space:
mode:
authorJosh <josh@halfnibble.com>2016-03-02 03:49:59 -0800
committerJosh <josh@halfnibble.com>2016-03-02 03:49:59 -0800
commitca8b99207a8a135ea1b970bd610ac8fa8fe2741a (patch)
treed9769b1b0d431cbddb91efbcd50b8399a59bac17 /wkhtmltopdf
parent31e8590845bbc94c72eabea798e1c0ea3a5571d2 (diff)
downloaddjango-wkhtmltopdf-ca8b99207a8a135ea1b970bd610ac8fa8fe2741a.tar.gz
django-wkhtmltopdf-ca8b99207a8a135ea1b970bd610ac8fa8fe2741a.tar.bz2
django-wkhtmltopdf-ca8b99207a8a135ea1b970bd610ac8fa8fe2741a.zip
Pass filename as string instead of a list. Modify comment to explain.
Diffstat (limited to 'wkhtmltopdf')
-rw-r--r--wkhtmltopdf/utils.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/wkhtmltopdf/utils.py b/wkhtmltopdf/utils.py
index 94af5de..c871bd0 100644
--- a/wkhtmltopdf/utils.py
+++ b/wkhtmltopdf/utils.py
@@ -113,8 +113,8 @@ def convert_to_pdf(filename, header_filename=None, footer_filename=None, cmd_opt
# Clobber header_html and footer_html only if filenames are
# provided. These keys may be in self.cmd_options as hardcoded
# static files.
- # The argument `filename` should be a list. However, wkhtmltopdf will
- # coerce into a list if a string is passed.
+ # The argument `filename` may be a string or a list. However, wkhtmltopdf
+ # will coerce it into a list if a string is passed.
cmd_options = cmd_options if cmd_options else {}
if header_filename is not None:
@@ -180,7 +180,7 @@ def render_pdf_from_template(input_template, header_template, footer_template, c
)
footer_filename = footer_file.filename
- return convert_to_pdf(filename=[input_file.filename],
+ return convert_to_pdf(filename=input_file.filename,
header_filename=header_filename,
footer_filename=footer_filename,
cmd_options=cmd_options)