aboutsummaryrefslogtreecommitdiffstats
path: root/wkhtmltopdf/views.py
diff options
context:
space:
mode:
authorMatt Lenc <mattl@incuna.com>2014-06-19 11:26:05 +0100
committerMatt Lenc <mattl@incuna.com>2014-06-19 11:26:05 +0100
commit301bef0d6931582583a156b3195b8b13f54d2875 (patch)
tree9f6f4ada901749eaeddb32ac75c0955a5327c2b5 /wkhtmltopdf/views.py
parent47dc520837b5d099fecc0db27f38ee6ebf898a80 (diff)
downloaddjango-wkhtmltopdf-301bef0d6931582583a156b3195b8b13f54d2875.tar.gz
django-wkhtmltopdf-301bef0d6931582583a156b3195b8b13f54d2875.tar.bz2
django-wkhtmltopdf-301bef0d6931582583a156b3195b8b13f54d2875.zip
Bring back the test assert for title in content
Diffstat (limited to 'wkhtmltopdf/views.py')
-rw-r--r--wkhtmltopdf/views.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/wkhtmltopdf/views.py b/wkhtmltopdf/views.py
index 1c57869..2f1945d 100644
--- a/wkhtmltopdf/views.py
+++ b/wkhtmltopdf/views.py
@@ -5,6 +5,7 @@ from tempfile import NamedTemporaryFile
from django.conf import settings
from django.http import HttpResponse
from django.template.response import TemplateResponse
+from django.utils.encoding import smart_str
from django.views.generic import TemplateView
from .utils import (content_disposition_filename, make_absolute_paths,
@@ -73,7 +74,7 @@ class PDFTemplateResponse(TemplateResponse, PDFResponse):
context = self.resolve_context(self.context_data)
- content = template.render(context)
+ content = smart_str(template.render(context))
content = make_absolute_paths(content)
try: