From 2497664d38ee1a5651b1fe4762d0cafb5e0467de Mon Sep 17 00:00:00 2001 From: Brian Buck Date: Wed, 24 Aug 2016 07:31:42 -0600 Subject: Configure settings in `tests/run.py` for Django 1.10+ --- wkhtmltopdf/tests/run.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'wkhtmltopdf/tests') diff --git a/wkhtmltopdf/tests/run.py b/wkhtmltopdf/tests/run.py index e0021ab..4b3f65a 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 is lower versions + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'APP_DIRS': True, + 'DIRS': [], + 'OPTIONS': {}, + }, + ], WKHTMLTOPDF_DEBUG=False, ) -- cgit v1.2.3 From 671aa2c4fe5c77bd5ebc0b5091f82065a6bee0ed Mon Sep 17 00:00:00 2001 From: Brian Buck Date: Wed, 24 Aug 2016 08:16:24 -0600 Subject: Use the built-in Django tags for getting static and other media. --- wkhtmltopdf/tests/templates/footer.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'wkhtmltopdf/tests') 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 @@ - +{% load static %} + - + -- cgit v1.2.3 From e979d40d365e992fa035d1bce2c230699ffe255d Mon Sep 17 00:00:00 2001 From: Brian Buck Date: Wed, 24 Aug 2016 09:03:24 -0600 Subject: Fix typo in comment. --- wkhtmltopdf/tests/run.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'wkhtmltopdf/tests') diff --git a/wkhtmltopdf/tests/run.py b/wkhtmltopdf/tests/run.py index 4b3f65a..4ff7f9e 100644 --- a/wkhtmltopdf/tests/run.py +++ b/wkhtmltopdf/tests/run.py @@ -30,7 +30,7 @@ settings.configure( MEDIA_URL='/media/', STATIC_ROOT=os.path.join(DIRNAME, 'static'), STATIC_URL='/static/', - TEMPLATES = [ # For Django >= 1.10. Ignored is lower versions + TEMPLATES = [ # For Django >= 1.10. Ignored in lower versions { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'APP_DIRS': True, -- cgit v1.2.3