From d68d686208163adda4789609bb335982c5d480c4 Mon Sep 17 00:00:00 2001 From: mlen108 Date: Tue, 13 Nov 2012 17:10:26 +0000 Subject: Use MEDIA_URL instead of hard-coded string. --- wkhtmltopdf/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'wkhtmltopdf') diff --git a/wkhtmltopdf/views.py b/wkhtmltopdf/views.py index 8068135..6fe402f 100644 --- a/wkhtmltopdf/views.py +++ b/wkhtmltopdf/views.py @@ -78,7 +78,7 @@ class PDFTemplateResponse(TemplateResponse, PDFResponse): media_root = settings.MEDIA_ROOT if not media_root.endswith('/'): media_root += '/' - relative_path = '/site_media/media/' + relative_path = settings.MEDIA_URL for x in re.findall('''"({0}.*?)"'''.format(relative_path), content): content = content.replace(x, pathname2fileurl(media_root) + x[len(relative_path):]) -- cgit v1.2.3