From 9bc241a80b5dbd4c8893c38e8f30d33f2559e826 Mon Sep 17 00:00:00 2001 From: Brian Buck Date: Wed, 10 Aug 2016 13:36:23 -0600 Subject: Remove kwarg `current_app=None`. It does not appear to do anything and breaks on Django 1.10 --- wkhtmltopdf/views.py | 1 - 1 file changed, 1 deletion(-) diff --git a/wkhtmltopdf/views.py b/wkhtmltopdf/views.py index dff87b4..af93602 100644 --- a/wkhtmltopdf/views.py +++ b/wkhtmltopdf/views.py @@ -49,7 +49,6 @@ class PDFTemplateResponse(TemplateResponse, PDFResponse): context=context, status=status, content_type=content_type, - current_app=None, *args, **kwargs) self.set_filename(filename, show_content_in_browser) -- cgit v1.2.3 From f154ac1d9e168c3ed402657d24bea0e4f1f72584 Mon Sep 17 00:00:00 2001 From: Brian Buck Date: Tue, 23 Aug 2016 13:12:07 -0600 Subject: Update Travis config to support Python 3.5 plus Django versions 1.9 and 1.10 --- .travis.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.travis.yml b/.travis.yml index 0c64cd5..dab567f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,12 +4,15 @@ python: - "2.7" - "3.3" - "3.4" + - "3.5" env: - DJANGO="Django>=1.4,<1.5" - DJANGO="Django>=1.5,<1.6" - DJANGO="Django>=1.6,<1.7" - DJANGO="Django>=1.7,<1.8" - DJANGO="Django>=1.8,<1.9" + - DJANGO="Django>=1.9,<1.10" + - DJANGO="Django>=1.10,<2.0" matrix: exclude: @@ -21,6 +24,8 @@ matrix: env: DJANGO="Django>=1.4,<1.5" - python: "3.4" env: DJANGO="Django>=1.4,<1.5" + - python: "3.5" + env: DJANGO="Django>=1.4,<1.5 before_install: - PWD=`pwd` - "echo '## Installing dependencies'" -- cgit v1.2.3 From 7c9400e6e54d9e21ad816f3d70ab5a38e2b103cb Mon Sep 17 00:00:00 2001 From: Brian Buck Date: Tue, 23 Aug 2016 13:17:05 -0600 Subject: Don't test Django 1.9/1.10 under Python 2.6. Fix missing quote mark on Python 3.5 exclusion. --- .travis.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index dab567f..6895f1e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,12 +20,16 @@ matrix: env: DJANGO="Django>=1.7,<1.8" - python: "2.6" env: DJANGO="Django>=1.8,<1.9" + - python: "2.6" + env: DJANGO="Django>=1.9,<1.10" + - python: "2.6" + env: DJANGO="Django>=1.10,<2.0" - python: "3.3" env: DJANGO="Django>=1.4,<1.5" - python: "3.4" env: DJANGO="Django>=1.4,<1.5" - python: "3.5" - env: DJANGO="Django>=1.4,<1.5 + env: DJANGO="Django>=1.4,<1.5" before_install: - PWD=`pwd` - "echo '## Installing dependencies'" -- cgit v1.2.3 From bab63b5db53baca6b3ce9da81bef62bdc368f438 Mon Sep 17 00:00:00 2001 From: Brian Buck Date: Tue, 23 Aug 2016 14:16:18 -0600 Subject: Get correct Django versions for Python 3.5 --- .travis.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.travis.yml b/.travis.yml index 6895f1e..42de036 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,6 +30,12 @@ matrix: env: DJANGO="Django>=1.4,<1.5" - python: "3.5" env: DJANGO="Django>=1.4,<1.5" + - python: "3.5" + env: DJANGO="Django>=1.5,<1.6" + - python: "3.5" + env: DJANGO="Django>=1.6,<1.7" + - python: "3.5" + env: DJANGO="Django>=1.7,<1.8" before_install: - PWD=`pwd` - "echo '## Installing dependencies'" -- cgit v1.2.3 From c39642f54b3ab4ab22fa876ece5d277719322f56 Mon Sep 17 00:00:00 2001 From: Brian Buck Date: Tue, 23 Aug 2016 14:28:03 -0600 Subject: Get correct Django versions for Python 3.3 --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index 42de036..56a72fb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,6 +26,10 @@ matrix: env: DJANGO="Django>=1.10,<2.0" - python: "3.3" env: DJANGO="Django>=1.4,<1.5" + - python: "3.3" + env: DJANGO="Django>=1.9,<1.10" + - python: "3.3" + env: DJANGO="Django>=1.10,<2.0" - python: "3.4" env: DJANGO="Django>=1.4,<1.5" - python: "3.5" -- cgit v1.2.3 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(+) 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(-) 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(-) 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