Make sure falafel theme is somewhat available by default
This commit is contained in:
parent
b633c91b66
commit
77f26f01d4
|
@ -48,6 +48,9 @@ class ConfigExtension(BaseExtension):
|
||||||
Session.configure(rattail_config=config)
|
Session.configure(rattail_config=config)
|
||||||
configure_session(config, Session)
|
configure_session(config, Session)
|
||||||
|
|
||||||
|
# provide default theme selection
|
||||||
|
config.setdefault('tailbone', 'themes', 'default, falafel')
|
||||||
|
|
||||||
|
|
||||||
def expose_vuejs_experiments(config):
|
def expose_vuejs_experiments(config):
|
||||||
return config.getbool('tailbone', 'expose_vuejs_experiments',
|
return config.getbool('tailbone', 'expose_vuejs_experiments',
|
||||||
|
|
|
@ -115,8 +115,10 @@ def before_render(event):
|
||||||
default=False)
|
default=False)
|
||||||
renderer_globals['expose_theme_picker'] = expose_picker
|
renderer_globals['expose_theme_picker'] = expose_picker
|
||||||
if 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',
|
available = request.rattail_config.getlist('tailbone', 'themes',
|
||||||
default=['bobcat'])
|
default=['falafel'])
|
||||||
if 'default' not in available:
|
if 'default' not in available:
|
||||||
available.insert(0, 'default')
|
available.insert(0, 'default')
|
||||||
options = [tags.Option(theme) for theme in available]
|
options = [tags.Option(theme) for theme in available]
|
||||||
|
|
Loading…
Reference in a new issue