diff --git a/common/djangoapps/edxmako/makoloader.py b/common/djangoapps/edxmako/makoloader.py index 994346a2ba0d832a8c2c2742049a2a064e92d5ac..cfe1915564ed63ca3109887d6bee35e23617802b 100644 --- a/common/djangoapps/edxmako/makoloader.py +++ b/common/djangoapps/edxmako/makoloader.py @@ -19,6 +19,7 @@ class MakoLoader(object): This is a Django loader object which will load the template as a Mako template if the first line is "## mako". It is based off BaseLoader in django.template.loader. + We need this in order to be able to include mako templates inside main_django.html. """ is_usable = False diff --git a/lms/envs/common.py b/lms/envs/common.py index 68fcc3e6c7780a6ad1b7cdbe745c8470a9497037..33e41b6333b3f9ba555bd9c205d1dbce29de5b62 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -472,12 +472,10 @@ TEMPLATES = [ # Options specific to this backend. 'OPTIONS': { 'loaders': [ + # We have to use mako-aware template loaders to be able to include + # mako templates inside django templates (such as main_django.html). 'edxmako.makoloader.MakoFilesystemLoader', 'edxmako.makoloader.MakoAppDirectoriesLoader', - - 'django.template.loaders.filesystem.Loader', - 'django.template.loaders.app_directories.Loader', - ], 'context_processors': [ 'django.template.context_processors.request',