Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Adding the templating caching template finder for non-local deployments #4

Merged
merged 1 commit into from

2 participants

@a-musing-moose

Template caching makes quite an impact to site performance, especially with complex templates such as those used in Oscar.

See the 'django.template.loaders.cached.Loader' on https://docs.djangoproject.com/en/dev/ref/templates/api/#loader-types for more details. In particular check the note about template tags and thread safety.

@codeinthehole codeinthehole merged commit 0ce2dc6 into tangentlabs:master
@codeinthehole

Lovely

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 21 additions and 0 deletions.
  1. +7 −0 www/conf/prod.py
  2. +7 −0 www/conf/stage.py
  3. +7 −0 www/conf/test.py
View
7 www/conf/prod.py
@@ -17,5 +17,12 @@
},
}
+TEMPLATE_LOADERS = (
+ ('django.template.loaders.cached.Loader', (
+ 'django.template.loaders.filesystem.Loader',
+ 'django.template.loaders.app_directories.Loader',
+ )),
+)
+
EMAIL_SUBJECT_PREFIX = '[{{ project_code }}][Prod] '
LOG_ROOT = os.path.join(os.path.dirname(__file__), '../../../logs/prod')
View
7 www/conf/stage.py
@@ -17,5 +17,12 @@
},
}
+TEMPLATE_LOADERS = (
+ ('django.template.loaders.cached.Loader', (
+ 'django.template.loaders.filesystem.Loader',
+ 'django.template.loaders.app_directories.Loader',
+ )),
+)
+
EMAIL_SUBJECT_PREFIX = '[{{ project_code }}][Stage] '
LOG_ROOT = os.path.join(os.path.dirname(__file__), '../../../logs/stage')
View
7 www/conf/test.py
@@ -17,5 +17,12 @@
},
}
+TEMPLATE_LOADERS = (
+ ('django.template.loaders.cached.Loader', (
+ 'django.template.loaders.filesystem.Loader',
+ 'django.template.loaders.app_directories.Loader',
+ )),
+)
+
EMAIL_SUBJECT_PREFIX = '[{{ project_code }}][Test] '
LOG_ROOT = os.path.join(os.path.dirname(__file__), '../../../logs/test')
Something went wrong with that request. Please try again.