aboutsummaryrefslogtreecommitdiffstats
path: root/wkhtmltopdf/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'wkhtmltopdf/utils.py')
-rw-r--r--wkhtmltopdf/utils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/wkhtmltopdf/utils.py b/wkhtmltopdf/utils.py
index 4666f4c..cf01f43 100644
--- a/wkhtmltopdf/utils.py
+++ b/wkhtmltopdf/utils.py
@@ -57,12 +57,12 @@ def wkhtmltopdf(pages, output=None, **kwargs):
return output
-def template_to_temp_file(*args, **kwargs):
+def template_to_temp_file(template_name, dictionary=None, context_instance=None):
"""
Renders a template to a temp file, and returns the path of the file.
"""
file_descriptor, tempfile_path = mkstemp(suffix='.html')
with fdopen(file_descriptor, 'wt') as f:
- f.write(smart_str(loader.render_to_string(*args, **kwargs)))
+ f.write(smart_str(loader.render_to_string(template_name, dictionary=dictionary, context_instance=context_instance)))
return tempfile_path