aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Turnbull <james@incuna.com>2012-03-09 09:27:16 +0000
committerJames Turnbull <james@incuna.com>2012-03-09 09:27:16 +0000
commit6869f502fa54ce3a2b677464d64bc1d7a5c73b94 (patch)
tree25639cc31aea7e2cd29935107e7e02172bcf0c14
parentba9ae996552c510b36d84e67ce3cda214f85c235 (diff)
downloaddjango-wkhtmltopdf-6869f502fa54ce3a2b677464d64bc1d7a5c73b94.tar.gz
django-wkhtmltopdf-6869f502fa54ce3a2b677464d64bc1d7a5c73b94.tar.bz2
django-wkhtmltopdf-6869f502fa54ce3a2b677464d64bc1d7a5c73b94.zip
Use get_template_names() to get templates
Rather than directly going to self.template_name use the get_template_names() function (which returns self.template_name if not overridden).
-rw-r--r--wkhtmltopdf/views.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/wkhtmltopdf/views.py b/wkhtmltopdf/views.py
index c26d1fc..b8e31d4 100644
--- a/wkhtmltopdf/views.py
+++ b/wkhtmltopdf/views.py
@@ -39,7 +39,7 @@ class PDFTemplateView(TemplateView):
self.context_instance = context_instance
- page_path = template_to_temp_file(self.template_name, self.get_context_data(), self.context_instance)
+ page_path = template_to_temp_file(self.get_template_names(), self.get_context_data(), self.context_instance)
pdf_kwargs = self.get_pdf_kwargs()
return self.response(wkhtmltopdf(page_path, **pdf_kwargs), self.get_filename())