aboutsummaryrefslogtreecommitdiffstats
path: root/wkhtmltopdf/utils.py
diff options
context:
space:
mode:
authorMatti Varjokallio <matti.varjokallio@iki.fi>2012-11-29 16:50:49 +0200
committerMatti Varjokallio <matti.varjokallio@iki.fi>2012-11-29 16:50:49 +0200
commitc80f46277ca8044c28da8da88335f654593fd225 (patch)
treea1997f2fd4a131a8589e829c234e0b5950bba7d8 /wkhtmltopdf/utils.py
parent58018c55186016f5dcf675fe48c883758edbbfa7 (diff)
downloaddjango-wkhtmltopdf-c80f46277ca8044c28da8da88335f654593fd225.tar.gz
django-wkhtmltopdf-c80f46277ca8044c28da8da88335f654593fd225.tar.bz2
django-wkhtmltopdf-c80f46277ca8044c28da8da88335f654593fd225.zip
Removed extra slashes so the local file paths work in Windows.
Diffstat (limited to 'wkhtmltopdf/utils.py')
-rw-r--r--wkhtmltopdf/utils.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/wkhtmltopdf/utils.py b/wkhtmltopdf/utils.py
index 0111736..9907f93 100644
--- a/wkhtmltopdf/utils.py
+++ b/wkhtmltopdf/utils.py
@@ -6,6 +6,7 @@ from itertools import chain
import os
import sys
import urllib
+from urlparse import urljoin
from django.conf import settings
@@ -119,4 +120,4 @@ def http_quote(string):
def pathname2fileurl(pathname):
"""Returns a file:// URL for pathname. Handles OS-specific conversions."""
- return 'file://' + urllib.pathname2url(pathname)
+ return urljoin('file:', urllib.pathname2url(pathname))