Commit cbf12d40 authored by Johannes Schilling's avatar Johannes Schilling

util/web: add default_theme to themes if not already present

the rationale being that themes other than the default only override
theme building blocks that are specific to them/changed from the
default, so in order to have all building blocks available, we need the
default theme as the last fallback option available
parent 4c0b94bc
......@@ -91,6 +91,11 @@ def update_meta_from_request(metadata, form):
class ThemeSupportTemplateLoader(BaseLoader):
def __init__(self, themes):
## if the default theme is not in the list of selected themes, we must
## add it, because the assumption is that it has all theme building
## blocks, whereas individual other themes only override those changed
if config.default_theme not in map(lambda x: x[1], config.themes_by_url):
self.loaders = dict([
(theme, FileSystemLoader(os.path.join(config.templates, theme))) \
for theme in themes])
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment