From 1119e1e69a3544687789f75dc0dce43953dd1258 Mon Sep 17 00:00:00 2001 From: Felipe Montoya Date: Thu, 12 Apr 2018 17:51:54 -0500 Subject: [PATCH] Making the include function used to support static .underscore templates support comprehensive_theming --- .../pipeline_mako/templates/static_content.html | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/common/djangoapps/pipeline_mako/templates/static_content.html b/common/djangoapps/pipeline_mako/templates/static_content.html index 56461ed7c8..da6868b8ab 100644 --- a/common/djangoapps/pipeline_mako/templates/static_content.html +++ b/common/djangoapps/pipeline_mako/templates/static_content.html @@ -86,7 +86,13 @@ except: from django.conf import settings from django.template.engine import Engine from django.template.loaders.filesystem import Loader -engine = Engine(dirs=settings.DEFAULT_TEMPLATE_ENGINE['DIRS']) +from openedx.core.djangoapps.theming.helpers import get_current_theme +dirs = settings.DEFAULT_TEMPLATE_ENGINE['DIRS'] +theme = get_current_theme() +if theme: + dirs = list(dirs) + dirs.insert(0, theme.path / 'templates') +engine = Engine(dirs=dirs) source, template_path = Loader(engine).load_template_source(path) %>${source | n, decode.utf8}