0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-12-01 11:41:20 +01:00

Give Jinja2 templates their own location in testapp

The Jinja2 template config here isn't currently used at all - having
the same APP_DIRS / DIRS config as the Django template engine (which
has higher precedence) means that it will never be selected for
rendering templates, and the existing jinja2 tests bypass Django's
template engine selection and call the jinja2 engine directly.

By giving jinja2 templates their own dedicated location, we can reliably
control which engine is used for which templates.
This commit is contained in:
Matt Westcott 2016-07-20 10:53:48 +01:00
parent 832646eb25
commit 7b9399019b

View File

@ -55,7 +55,10 @@ TEMPLATES = [
},
{
'BACKEND': 'django.template.backends.jinja2.Jinja2',
'APP_DIRS': True,
'APP_DIRS': False,
'DIRS': [
os.path.join(WAGTAIL_ROOT, 'tests', 'testapp', 'jinja2_templates'),
],
'OPTIONS': {
'extensions': [
'wagtail.wagtailcore.jinja2tags.core',