From d996f50ecb15a3899a94c0011efe32e1b11c1ad6 Mon Sep 17 00:00:00 2001 From: Andy Grabow Date: Fri, 23 Mar 2018 14:40:51 +0100 Subject: [PATCH] make the loader compatible with django 1.11 --- Makefile | 2 +- Pipfile | 6 ------ pypugjs/ext/django/loader.py | 3 +-- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 50737e7..21b8e22 100644 --- a/Makefile +++ b/Makefile @@ -34,7 +34,7 @@ lint: ## check style with flake8 test: ## run testsuite @SCRIPT_DIR=$$( cd "$$( dirname "$$0" )" && pwd ); \ export PYTHONPATH=$$PYTHONPATH:$$SCRIPT_DIR; \ - nosetests -w pypugjs/testsuite/ # --nocapture for debugging + nosetests -w pypugjs/testsuite/ # --nocapture # for debugging @make lint coverage: ## test and generate coverage data diff --git a/Pipfile b/Pipfile index 99763fa..15c27dc 100644 --- a/Pipfile +++ b/Pipfile @@ -1,12 +1,9 @@ [[source]] - url = "https://pypi.python.org/simple" verify_ssl = true name = "pypi" - [packages] - "jinja2" = "*" mako = "*" tornado = "*" @@ -14,9 +11,6 @@ six = "*" coverage = "*" nose = "*" flask = "*" -django = "*" - [dev-packages] - ipdb = "*" diff --git a/pypugjs/ext/django/loader.py b/pypugjs/ext/django/loader.py index 4f11544..fa50336 100644 --- a/pypugjs/ext/django/loader.py +++ b/pypugjs/ext/django/loader.py @@ -63,7 +63,7 @@ def get_template_sources(self, template_name): for origin in loader.get_template_sources(template_name): yield origin - def get_template(self, template_name, skip=None): + def get_template(self, template_name, skip=None, **kwargs): """ Call self.get_template_sources() and return a Template object for the first template matching template_name. If skip is provided, ignore @@ -74,7 +74,6 @@ def get_template(self, template_name, skip=None): also cached because this resulted in a major loading issued in a wagtail admin instance. """ - template = self.template_cache.get(template_name) if not template or self.debug: try: