diff wikiconfig.py @ 3423:6fa56b0f0de4

re-add wikiconfig_local a bit differently
author Johannes Berg <johannes AT sipsolutions DOT net>
date Thu, 27 Mar 2008 21:05:42 +0100
parents 8306c3b93081
children 95266d0c8a6f a0babca35e5d
line wrap: on
line diff
--- a/wikiconfig.py	Sun Mar 23 13:18:03 2008 +0100
+++ b/wikiconfig.py	Thu Mar 27 21:05:42 2008 +0100
@@ -9,7 +9,7 @@
 from MoinMoin.config.multiconfig import DefaultConfig
 
 
-class Config(DefaultConfig):
+class LocalConfig(DefaultConfig):
     # vvv DON'T TOUCH THIS EXCEPT IF YOU KNOW WHAT YOU DO vvv
     moinmoin_dir = os.path.abspath(os.path.normpath(os.path.dirname(sys.argv[0])))
     data_dir = os.path.join(moinmoin_dir, 'wiki', 'data')
@@ -23,3 +23,24 @@
     page_front_page = u'FrontPage' # change to some better value
     # ^^^ DON'T TOUCH THIS EXCEPT IF YOU KNOW WHAT YOU DO ^^^
 
+
+    # Add your configuration items here.
+
+
+
+# DEVELOPERS! Do not add your configuration items there,
+# you could accidentally commit them! Instead, create a
+# wikiconfig_local.py file containing this:
+#
+# from wikiconfig import LocalConfig
+#
+# class Config(LocalConfig):
+#     configuration_item_1 = 'value1'
+#
+
+try:
+    from wikiconfig_local import Config
+except ImportError, err:
+    if not str(err).endswith('wikiconfig_local'):
+        raise
+    Config = LocalConfig