diff options
Diffstat (limited to 'wkhtmltopdf/tests')
-rw-r--r-- | wkhtmltopdf/tests/run.py | 9 | ||||
-rw-r--r-- | wkhtmltopdf/tests/templates/footer.html | 5 |
2 files changed, 12 insertions, 2 deletions
diff --git a/wkhtmltopdf/tests/run.py b/wkhtmltopdf/tests/run.py index e0021ab..4ff7f9e 100644 --- a/wkhtmltopdf/tests/run.py +++ b/wkhtmltopdf/tests/run.py @@ -18,6 +18,7 @@ settings.configure( } }, INSTALLED_APPS=( + 'django.contrib.contenttypes', 'wkhtmltopdf.tests', 'wkhtmltopdf', ), @@ -29,6 +30,14 @@ settings.configure( MEDIA_URL='/media/', STATIC_ROOT=os.path.join(DIRNAME, 'static'), STATIC_URL='/static/', + TEMPLATES = [ # For Django >= 1.10. Ignored in lower versions + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'APP_DIRS': True, + 'DIRS': [], + 'OPTIONS': {}, + }, + ], WKHTMLTOPDF_DEBUG=False, ) diff --git a/wkhtmltopdf/tests/templates/footer.html b/wkhtmltopdf/tests/templates/footer.html index cf98267..9deaf30 100644 --- a/wkhtmltopdf/tests/templates/footer.html +++ b/wkhtmltopdf/tests/templates/footer.html @@ -1,3 +1,4 @@ -<script src="{{ STATIC_URL }}sample_js_not_existing.js"></script> +{% load static %} +<script src="{% static 'sample_js_not_existing.js' %}"></script> -<img src="{{ MEDIA_URL }}sample_image_not_existing.png" /> +<img src="{% get_media_prefix %}sample_image_not_existing.png" /> |