Enable Comprehensive Theming – Devstack – Mako Template Overrides Not Working

Issue
After enabling comprehensive theming on devstack_docker I was not able to successfully override a theme template file. CSS changes through Sass updates were working just fine.

I looked at Setup to develop a custom theme in devstack but it had no solution.

Solution
Details: https://openedx.slack.com/archives/C0G15M90X/p1604520587008500

For those having issues getting their comprehensive theming working for overridden template files uncomment these lines in lms/envs/devstack.py.

The issue lies in adding the theme template directories to the Mako base templates with this assignment being the answer to how it works.
TEMPLATES[1]["DIRS"] = _make_mako_template_dirs

cc: @sambapete, @jill, @djoy, @Tuchfarber

2 Likes

Yeah… that was new to me too. By the way, the same works for the Studio as well if you insert such snippet there.

@Tuchfarber @regis I added this pull request to include instructions on how to enable comprehensive theming for devstack. This hopefully will prevent issues with Mako template theme overrides from not working. If you can review this PR please do and make any recommended changes.

1 Like