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(-) 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_DIRS = ( ) 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 @@ INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.staticfiles', 'django_countries', + 'django_jinja', 'main', 'mirrors', -- cgit v1.2.3-55-g3dc8