diff --git a/tailbone/subscribers.py b/tailbone/subscribers.py index 707de1e0..de1177d6 100644 --- a/tailbone/subscribers.py +++ b/tailbone/subscribers.py @@ -124,8 +124,12 @@ def before_render(event): renderer_globals['messaging_enabled'] = request.rattail_config.getbool( 'tailbone', 'messaging.enabled', default=False) - renderer_globals['background_color'] = request.rattail_config.get( - 'tailbone', 'background_color') + # 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') def add_inbox_count(event):