diff options
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), |