From 58b669cdbac3fe8ef8c3bbab9a66c0307825f6eb Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Mon, 28 Jun 2010 12:20:08 +0200 Subject: [PATCH] config: Use the proxy theme to set site-specific themes. --- conf/deadfoxjunction.py | 6 +++++- conf/exodus.py | 6 +++++- conf/extinction.py | 6 +++++- conf/farmconfig.py | 7 ++++--- 4 files changed, 19 insertions(+), 6 deletions(-) diff --git a/conf/deadfoxjunction.py b/conf/deadfoxjunction.py index 145db8e..e91d028 100644 --- a/conf/deadfoxjunction.py +++ b/conf/deadfoxjunction.py @@ -24,7 +24,11 @@ class Config(FarmConfig): editor_force = True editor_default = 'text' # internal default, just for completeness - theme_default = 'deadfoxjunction' + # Use a site-theme for /Site/ and a normal wiki theme for the rest. + proxy_theme_mapping = [ + ('/Site/', 'deadfoxjunction'), + ('', 'modernized'), + ] # Set cookies on /, so they work on /wipi and /Site alike. cookie_path = '/' diff --git a/conf/exodus.py b/conf/exodus.py index 607d279..5e144db 100644 --- a/conf/exodus.py +++ b/conf/exodus.py @@ -23,7 +23,11 @@ class Config(FarmConfig): editor_force = True editor_default = 'text' # internal default, just for completeness - theme_default = 'exodus' + # Use a site-theme for /Site/ and a normal wiki theme for the rest. + proxy_theme_mapping = [ + ('/Site/', 'exodus'), + ('', 'modernized'), + ] # Set cookies on /, so they work on /wipi and /Site alike. cookie_path = '/' diff --git a/conf/extinction.py b/conf/extinction.py index 3af4998..9046bcb 100644 --- a/conf/extinction.py +++ b/conf/extinction.py @@ -23,6 +23,10 @@ class Config(FarmConfig): editor_force = True editor_default = 'text' # internal default, just for completeness - theme_default = 'modernized' + # Use a site-theme for /Site/ and a normal wiki theme for the rest. + proxy_theme_mapping = [ + ('/Site/', 'extinction'), + ('', 'modernized'), + ] # vim: set ts=8 sts=4 sw=4 expandtab: diff --git a/conf/farmconfig.py b/conf/farmconfig.py index 194b498..7fdcbff 100644 --- a/conf/farmconfig.py +++ b/conf/farmconfig.py @@ -128,9 +128,10 @@ class FarmConfig(DefaultConfig): u'HelpContents', ] - # The default theme anonymous or new users get - theme_default = 'modern' - + # Always use the proxy. Specific configs define a proxy_theme_mapping, + # which maps specific paths to a corresponding theme. + theme_default = 'proxy' + theme_force = True # Language options -------------------------------------------------- -- 2.30.2