aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Liuti <liuti.john@gmail.com>2016-08-24 17:20:36 +0200
committerGitHub <noreply@github.com>2016-08-24 17:20:36 +0200
commit5f9cdf70b62a4ea5bb6f657387f117b41a553628 (patch)
tree212c503078622ab184b9332a960778378555c046
parent59d3a49ae52756d9733a9ac2b6c5ed01587b9433 (diff)
parente979d40d365e992fa035d1bce2c230699ffe255d (diff)
downloaddjango-wkhtmltopdf-5f9cdf70b62a4ea5bb6f657387f117b41a553628.tar.gz
django-wkhtmltopdf-5f9cdf70b62a4ea5bb6f657387f117b41a553628.tar.bz2
django-wkhtmltopdf-5f9cdf70b62a4ea5bb6f657387f117b41a553628.zip
Merge pull request #119 from brianjbuck/remove-current-app-kwarg
Remove kwarg `current_app=None`.
-rw-r--r--.travis.yml19
-rw-r--r--wkhtmltopdf/tests/run.py9
-rw-r--r--wkhtmltopdf/tests/templates/footer.html5
-rw-r--r--wkhtmltopdf/views.py1
4 files changed, 31 insertions, 3 deletions
diff --git a/.travis.yml b/.travis.yml
index 0c64cd5..56a72fb 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:
@@ -17,10 +20,26 @@ 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.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"
+ 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'"
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" />
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)