From fe20aff2bb32a7e2a691f2f78b5cd617ed618243 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sat, 18 Oct 2014 12:45:51 -0500 Subject: Disable eggs template loader --- settings.py | 1 - 1 file changed, 1 deletion(-) (limited to 'settings.py') diff --git a/settings.py b/settings.py index 368dcb73..cc1f3a53 100644 --- a/settings.py +++ b/settings.py @@ -61,7 +61,6 @@ TEMPLATE_LOADERS = ( 'django.template.loaders.filesystem.Loader', - 'django.template.loaders.eggs.Loader', 'django.template.loaders.app_directories.Loader', ) -- cgit v1.2.3-54-g00ecf From f4a6eff33815a713b1141ea94a872bd7c6233699 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sat, 18 Oct 2014 13:38:54 -0500 Subject: Install and wire up django-jinja Signed-off-by: Dan McGee --- requirements.txt | 2 ++ requirements_prod.txt | 2 ++ settings.py | 8 ++++++-- 3 files changed, 10 insertions(+), 2 deletions(-) (limited to 'settings.py') diff --git a/requirements.txt b/requirements.txt index eff75bad..e2b49aba 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,8 +2,10 @@ -e git+git://github.com/SmileyChris/django-countries.git@a2c924074dbe2f0b9b3059bf70064aeadf5643ed#egg=django-countries Django==1.7 IPy==0.81 +Jinja2==2.7.3 Markdown==2.4.1 bencode==1.0 +django-jinja==1.0.4 jsmin==2.0.11 pgpdump==1.5 pytz>=2014.7 diff --git a/requirements_prod.txt b/requirements_prod.txt index c181c3af..020a5ac4 100644 --- a/requirements_prod.txt +++ b/requirements_prod.txt @@ -2,8 +2,10 @@ -e git+git://github.com/SmileyChris/django-countries.git@a2c924074dbe2f0b9b3059bf70064aeadf5643ed#egg=django-countries Django==1.7 IPy==0.81 +Jinja2==2.7.3 Markdown==2.4.1 bencode==1.0 +django-jinja==1.0.4 jsmin==2.0.11 pgpdump==1.5 psycopg2==2.5.4 diff --git a/settings.py b/settings.py index cc1f3a53..5b2195cb 100644 --- a/settings.py +++ b/settings.py @@ -60,10 +60,13 @@ ) TEMPLATE_LOADERS = ( - 'django.template.loaders.filesystem.Loader', - 'django.template.loaders.app_directories.Loader', + 'django_jinja.loaders.FileSystemLoader', + 'django_jinja.loaders.AppLoader', ) +# Send templates matching the following to the Jinja2 engine +DEFAULT_JINJA2_TEMPLATE_EXTENSION = '.jinja' + MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', @@ -114,6 +117,7 @@ 'django.contrib.admin', 'django.contrib.staticfiles', 'django_countries', + 'django_jinja', 'main', 'mirrors', -- cgit v1.2.3-54-g00ecf From 2914fc55c4618d97a3ab5a7d519545979f526677 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sat, 18 Oct 2014 14:05:47 -0500 Subject: Enable Jinja2 template bytecode caching Signed-off-by: Dan McGee --- settings.py | 1 + 1 file changed, 1 insertion(+) (limited to 'settings.py') diff --git a/settings.py b/settings.py index 5b2195cb..ba6c68ee 100644 --- a/settings.py +++ b/settings.py @@ -183,6 +183,7 @@ TEMPLATE_LOADERS = ( ('django.template.loaders.cached.Loader', TEMPLATE_LOADERS), ) + JINJA2_BYTECODE_CACHE_ENABLE = True # Enable the debug toolbar if requested if DEBUG_TOOLBAR: -- cgit v1.2.3-54-g00ecf