aboutsummaryrefslogtreecommitdiffstats
path: root/wkhtmltopdf/utils.py
diff options
context:
space:
mode:
authorMarc Tamlyn <marc.tamlyn@gmail.com>2012-07-27 11:37:19 +0100
committerMarc Tamlyn <marc.tamlyn@gmail.com>2012-07-27 11:37:19 +0100
commitf172db7a2a7f404e6543f04fc8664800591848e4 (patch)
tree9fb9a6ebf9e78c2693a76cebef5fd9f3995080a6 /wkhtmltopdf/utils.py
parente4a84d5f2e1282ed62d19ce7c52ca57eabb54598 (diff)
downloaddjango-wkhtmltopdf-f172db7a2a7f404e6543f04fc8664800591848e4.tar.gz
django-wkhtmltopdf-f172db7a2a7f404e6543f04fc8664800591848e4.tar.bz2
django-wkhtmltopdf-f172db7a2a7f404e6543f04fc8664800591848e4.zip
Remove more deprecated stuff and tests for them.
Diffstat (limited to 'wkhtmltopdf/utils.py')
-rw-r--r--wkhtmltopdf/utils.py13
1 files changed, 0 insertions, 13 deletions
diff --git a/wkhtmltopdf/utils.py b/wkhtmltopdf/utils.py
index 69114b7..f95eddf 100644
--- a/wkhtmltopdf/utils.py
+++ b/wkhtmltopdf/utils.py
@@ -7,7 +7,6 @@ import os
import sys
from tempfile import mkstemp
import urllib
-import warnings
from django.conf import settings
from django.template import loader
@@ -87,18 +86,6 @@ def wkhtmltopdf(pages, output=None, **kwargs):
return check_output(args, stderr=sys.stderr, env=env)
-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.
- """
- warnings.warn('template_to_temp_file is deprecated in favour of PDFResponse. It will be removed in version 1.',
- PendingDeprecationWarning, 2)
- file_descriptor, tempfile_path = mkstemp(suffix='.html')
- with fdopen(file_descriptor, 'wt') as f:
- f.write(smart_str(loader.render_to_string(template_name, dictionary=dictionary, context_instance=context_instance)))
- return tempfile_path
-
-
def content_disposition_filename(filename):
"""
Sanitize a file name to be used in the Content-Disposition HTTP