summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--settings.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/settings.py b/settings.py
index fb2efcb..9f025ad 100644
--- a/settings.py
+++ b/settings.py
@@ -64,13 +64,17 @@ TEMPLATE_DIRS = (
)
TEMPLATE_LOADERS = (
- ('django.template.loaders.cached.Loader', (
- 'django.template.loaders.filesystem.Loader',
- 'django.template.loaders.eggs.Loader',
- 'django.template.loaders.app_directories.Loader',
- )),
+ 'django.template.loaders.filesystem.Loader',
+ 'django.template.loaders.eggs.Loader',
+ 'django.template.loaders.app_directories.Loader',
)
+# Enable caching templates in production environments
+if not TEMPLATE_DEBUG:
+ TEMPLATE_LOADERS = (
+ ('django.template.loaders.cached.Loader', TEMPLATE_LOADERS),
+ )
+
# Set django's User stuff to use our profile model
# format is app.model
AUTH_PROFILE_MODULE = 'main.UserProfile'