Allow apps to set background color per request
This commit is contained in:
parent
9a85bd0edb
commit
5d04de936b
|
@ -124,6 +124,10 @@ def before_render(event):
|
|||
renderer_globals['messaging_enabled'] = request.rattail_config.getbool(
|
||||
'tailbone', 'messaging.enabled', default=False)
|
||||
|
||||
# background color may be set per-request, by some apps
|
||||
if hasattr(request, 'background_color') and request.background_color:
|
||||
renderer_globals['background_color'] = request.background_color
|
||||
else: # otherwise we use the one from config
|
||||
renderer_globals['background_color'] = request.rattail_config.get(
|
||||
'tailbone', 'background_color')
|
||||
|
||||
|
|
Loading…
Reference in a new issue