diff options
author | George Hickman <george@ghickman.co.uk> | 2013-09-20 04:38:45 -0700 |
---|---|---|
committer | George Hickman <george@ghickman.co.uk> | 2013-09-20 04:38:45 -0700 |
commit | 486e63e46eff06d0e46cd6b8e04e393f22beb40d (patch) | |
tree | 212fc8be57d811ddf71c650f4e7f59b605781899 /wkhtmltopdf | |
parent | 9c5d3def72cafdcfd85784c53836421943e83277 (diff) | |
parent | b3dbff596676d983de5ccee6727945c3b3360ca9 (diff) | |
download | django-wkhtmltopdf-486e63e46eff06d0e46cd6b8e04e393f22beb40d.tar.gz django-wkhtmltopdf-486e63e46eff06d0e46cd6b8e04e393f22beb40d.tar.bz2 django-wkhtmltopdf-486e63e46eff06d0e46cd6b8e04e393f22beb40d.zip |
Merge pull request #41 from incuna/fix-tests
Fix tests on Travis
Diffstat (limited to 'wkhtmltopdf')
-rw-r--r-- | wkhtmltopdf/test_settings.py | 2 | ||||
-rw-r--r-- | wkhtmltopdf/utils.py | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/wkhtmltopdf/test_settings.py b/wkhtmltopdf/test_settings.py index 9f6e461..16fb734 100644 --- a/wkhtmltopdf/test_settings.py +++ b/wkhtmltopdf/test_settings.py @@ -4,6 +4,8 @@ DEBUG = True DIRNAME = os.path.abspath(os.path.dirname(__file__)) +SECRET_KEY = 'fooooooo' + DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', diff --git a/wkhtmltopdf/utils.py b/wkhtmltopdf/utils.py index be6bc6a..1b74a97 100644 --- a/wkhtmltopdf/utils.py +++ b/wkhtmltopdf/utils.py @@ -1,7 +1,6 @@ from __future__ import absolute_import from copy import copy -from functools import wraps from itertools import chain import os import re @@ -80,7 +79,9 @@ def wkhtmltopdf(pages, output=None, **kwargs): if env is not None: env = dict(os.environ, **env) - cmd = getattr(settings, 'WKHTMLTOPDF_CMD', 'wkhtmltopdf') + cmd = 'WKHTMLTOPDF_CMD' + cmd = getattr(settings, cmd, os.environ.get(cmd, 'wkhtmltopdf')) + ck_args = list(chain(cmd.split(), _options_to_args(**options), list(pages), |