Skip to content

Commit 064ca62

Browse files
committed
fix: corrects naming of make_mako_template_dirs function
1 parent 06d0bee commit 064ca62

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

docs/devstack_faq.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,19 +115,19 @@ Make sure that you enable the following code in ./edx-platform/lms/envs/devstack
115115
# theme directories to COMPREHENSIVE_THEME_DIRS
116116
117117
# We have to import the private method here because production.py calls
118-
# derive_settings('lms.envs.production') which runs _make_mako_template_dirs with
118+
# derive_settings('lms.envs.production') which runs make_mako_template_dirs with
119119
# the settings from production, which doesn't include these theming settings. Thus,
120120
# the templating engine is unable to find the themed templates because they don't exist
121121
# in it's path. Re-calling derive_settings doesn't work because the settings was already
122122
# changed from a function to a list, and it can't be derived again.
123123
124-
from .common import _make_mako_template_dirs
124+
from .common import make_mako_template_dirs
125125
ENABLE_COMPREHENSIVE_THEMING = True
126126
COMPREHENSIVE_THEME_DIRS = [
127127
"/edx/app/edxapp/edx-platform/themes/",
128128
"/edx/app/edx-themes/edx-platform/",
129129
]
130-
TEMPLATES[1]["DIRS"] = Derived(_make_mako_template_dirs)
130+
TEMPLATES[1]["DIRS"] = Derived(make_mako_template_dirs)
131131
derive_settings(__name__)
132132
133133
Enabling a theme

provision-set-edx-theme.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ fi
2121
popd
2222

2323
# Uncomment relevant lines in the devstack.py file
24-
sed -i '' "s|^# from .common import _make_mako_template_dirs|from .common import _make_mako_template_dirs|" "$DEVSTACK_FILE"
24+
sed -i '' "s|^# from .common import make_mako_template_dirs|from .common import make_mako_template_dirs|" "$DEVSTACK_FILE"
2525
sed -i '' "s|^# ENABLE_COMPREHENSIVE_THEMING = True|ENABLE_COMPREHENSIVE_THEMING = True|" "$DEVSTACK_FILE"
2626
sed -i '' "s|^# COMPREHENSIVE_THEME_DIRS = \[|COMPREHENSIVE_THEME_DIRS = \[|" "$DEVSTACK_FILE"
2727
sed -i '' "s|^# \"/edx/app/edxapp/edx-platform/themes/\"| \"/edx/app/edxapp/edx-platform/themes/\",|" "$DEVSTACK_FILE"
2828
sed -i '' "/COMPREHENSIVE_THEME_DIRS = \[/a\\
2929
\"$THEME_DIR\",
3030
" "$DEVSTACK_FILE"
3131
sed -i '' "s|^# \]|]|" "$DEVSTACK_FILE"
32-
sed -i '' "s|^# TEMPLATES\[1\]\[\"DIRS\"\] = Derived(_make_mako_template_dirs)|TEMPLATES[1][\"DIRS\"] = Derived(_make_mako_template_dirs)|" "$DEVSTACK_FILE"
32+
sed -i '' "s|^# TEMPLATES\[1\]\[\"DIRS\"\] = Derived(make_mako_template_dirs)|TEMPLATES[1][\"DIRS\"] = Derived(make_mako_template_dirs)|" "$DEVSTACK_FILE"
3333
sed -i '' "s|^# derive_settings(__name__)|derive_settings(__name__)|" "$DEVSTACK_FILE"
3434

3535

py_configuration_files/lms.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -484,18 +484,19 @@ def should_show_debug_toolbar(request): # lint-amnesty, pylint: disable=missing
484484
# theme directories to COMPREHENSIVE_THEME_DIRS
485485

486486
# We have to import the private method here because production.py calls
487-
# derive_settings('lms.envs.production') which runs _make_mako_template_dirs with
487+
# derive_settings('lms.envs.production') which runs make_mako_template_dirs with
488488
# the settings from production, which doesn't include these theming settings. Thus,
489489
# the templating engine is unable to find the themed templates because they don't exist
490490
# in it's path. Re-calling derive_settings doesn't work because the settings was already
491491
# changed from a function to a list, and it can't be derived again.
492492

493-
# from .common import _make_mako_template_dirs
493+
# from .common import make_mako_template_dirs
494494
# ENABLE_COMPREHENSIVE_THEMING = True
495495
# COMPREHENSIVE_THEME_DIRS = [
496+
# "/edx/src/edx-themes/edx-platform",
496497
# "/edx/app/edxapp/edx-platform/themes/"
497498
# ]
498-
# TEMPLATES[1]["DIRS"] = Derived(_make_mako_template_dirs)
499+
# TEMPLATES[1]["DIRS"] = Derived(make_mako_template_dirs)
499500
# derive_settings(__name__)
500501

501502
# Uncomment the lines below if you'd like to see SQL statements in your devstack LMS log.

0 commit comments

Comments
 (0)