diff wikiserverconfig.py @ 4618:0e7c007f8ed9

handle wikiserverconfig(_local) in the same way as wikiconfig(_local) (thanks to Raphael Bossek for the patch)
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 01 Mar 2009 15:07:39 +0100
parents e7f1cf9eeb96
children 7000bf88e348
line wrap: on
line diff
--- a/wikiserverconfig.py	Sun Mar 01 04:11:08 2009 +0100
+++ b/wikiserverconfig.py	Sun Mar 01 15:07:39 2009 +0100
@@ -6,7 +6,7 @@
 
 from MoinMoin.script.server.standalone import DefaultConfig
 
-class Config(DefaultConfig):
+class LocalConfig(DefaultConfig):
     port = 8080 # if you use port < 1024, you need to start as root
 
     # if you start the server as root, the standalone server can change
@@ -40,3 +40,19 @@
     # debugger, anything else (or not setting it) will disable the debugger.
     debug = os.environ.get('MOIN_DEBUGGER', 'False') == 'True'
 
+# DEVELOPERS! Do not add your configuration items there,
+# you could accidentally commit them! Instead, create a
+# wikiserverconfig_local.py file containing this:
+#
+# from wikiserverconfig import LocalConfig
+#
+# class Config(LocalConfig):
+#     configuration_item_1 = 'value1'
+#
+
+try:
+    from wikiserverconfig_local import Config
+except ImportError, err:
+    if not str(err).endswith('wikiserverconfig_local'):
+        raise
+    Config = LocalConfig