Make sure falafel theme is somewhat available by default

This commit is contained in:
Lance Edgar 2020-01-29 22:01:44 -06:00
parent b633c91b66
commit 77f26f01d4
2 changed files with 6 additions and 1 deletions

View file

@ -48,6 +48,9 @@ class ConfigExtension(BaseExtension):
Session.configure(rattail_config=config)
configure_session(config, Session)
# provide default theme selection
config.setdefault('tailbone', 'themes', 'default, falafel')
def expose_vuejs_experiments(config):
return config.getbool('tailbone', 'expose_vuejs_experiments',

View file

@ -115,8 +115,10 @@ def before_render(event):
default=False)
renderer_globals['expose_theme_picker'] = expose_picker
if expose_picker:
# tailbone's config extension provides a default theme selection,
# so the default we specify here *probably* should not matter
available = request.rattail_config.getlist('tailbone', 'themes',
default=['bobcat'])
default=['falafel'])
if 'default' not in available:
available.insert(0, 'default')
options = [tags.Option(theme) for theme in available]