aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Turnbull <james@jamesturnbull.org>2013-01-10 01:57:58 -0800
committerJames Turnbull <james@jamesturnbull.org>2013-01-10 01:57:58 -0800
commit7c6b23835bcb4c00861685782a125210af85368f (patch)
tree4a0a1b4ead077ddf22dc1380ae63328d2b6ba5e1
parentb4b98ee420ca4774459a73b8cecd1d20627f1235 (diff)
parentc80f46277ca8044c28da8da88335f654593fd225 (diff)
downloaddjango-wkhtmltopdf-7c6b23835bcb4c00861685782a125210af85368f.tar.gz
django-wkhtmltopdf-7c6b23835bcb4c00861685782a125210af85368f.tar.bz2
django-wkhtmltopdf-7c6b23835bcb4c00861685782a125210af85368f.zip
Merge pull request #21 from shadowrock/fix-extra-slashes
Removed extra slashes so the local file paths work in Windows.
-rw-r--r--wkhtmltopdf/utils.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/wkhtmltopdf/utils.py b/wkhtmltopdf/utils.py
index 298bbb6..63310c3 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))