aboutsummaryrefslogtreecommitdiffstats
path: root/wkhtmltopdf
diff options
context:
space:
mode:
authormlen108 <matt.lenc@gmail.com>2012-11-13 17:10:26 +0000
committermlen108 <matt.lenc@gmail.com>2012-11-13 17:10:26 +0000
commitd68d686208163adda4789609bb335982c5d480c4 (patch)
treea9b6f08d618bc784c83cfd0fdf93195b6ed42161 /wkhtmltopdf
parentaf7fca488f8af4ea50fe3eada0abe8da3fa44f89 (diff)
downloaddjango-wkhtmltopdf-d68d686208163adda4789609bb335982c5d480c4.tar.gz
django-wkhtmltopdf-d68d686208163adda4789609bb335982c5d480c4.tar.bz2
django-wkhtmltopdf-d68d686208163adda4789609bb335982c5d480c4.zip
Use MEDIA_URL instead of hard-coded string.
Diffstat (limited to 'wkhtmltopdf')
-rw-r--r--wkhtmltopdf/views.py2
1 files changed, 1 insertions, 1 deletions
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):])