edx/edx-platform — pull request #2840 by tusbar (2014-03-06 16:32:43+00:00)
Title: Add method to clear mako template lookups

Warning: this is a quick and (really) dirty fix.

`edxmako.startup.run()` is called twice:
* first by `django_startup` (`common/lib/django_startup.py`)
* then by `lms.startup.run()`

When using custom theming, the theme template path is prepended to the `MAKO_TEMPLATES` settings variables in `lms.startup`. Unfortunately, at this point `edxmako.startup.run()` has already been executed so the theme template path will not be at the top of the lookup table (so mako template overrides will never get picked up).

Here’s the really quick fix I came up with, I’m aware that there should be a better way to do this (stop calling `edxmako.startup.run()` in `django_startup`?). I haven’t really had time to delve more into details. Let me know if you can think of a better way to fix this, I’ll update the PR accordingly.