diff --git a/openstack_dashboard/settings.py b/openstack_dashboard/settings.py index 7126d8d9f..bc325ff93 100644 --- a/openstack_dashboard/settings.py +++ b/openstack_dashboard/settings.py @@ -127,9 +127,11 @@ TEMPLATE_CONTEXT_PROCESSORS = ( ) TEMPLATE_LOADERS = ( - 'django.template.loaders.filesystem.Loader', - 'django.template.loaders.app_directories.Loader', - 'horizon.loaders.TemplateLoader', + ('django.template.loaders.cached.Loader', ( + 'django.template.loaders.filesystem.Loader', + 'django.template.loaders.app_directories.Loader', + 'horizon.loaders.TemplateLoader', + )), ) TEMPLATE_DIRS = ( diff --git a/releasenotes/notes/bp-cache-templates-4ab00dcda195a03a.yaml b/releasenotes/notes/bp-cache-templates-4ab00dcda195a03a.yaml new file mode 100644 index 000000000..d885328ac --- /dev/null +++ b/releasenotes/notes/bp-cache-templates-4ab00dcda195a03a.yaml @@ -0,0 +1,8 @@ +--- +features: + - Added the Django template cached loader, so templates are stored in memory. + See https://docs.djangoproject.com/en/1.8/ref/templates/api/#django.template.loaders.cached.Loader +upgrade: + - Custom template tags must have a thread-safe Node implementation to work + with the the cached loader. See + https://docs.djangoproject.com/en/1.8/howto/custom-template-tags/#template-tag-thread-safety