changeset 1057:4d1d491c3631

make multiconfig migration more obvious and provide a temporary solution if someone can't edit the wikiconfig/farmconfig immediately
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Tue, 25 Jul 2006 22:47:23 +0200
parents a2cb15c16cf4
children 0d32e92fbfe1 4b02826f6408
files MoinMoin/multiconfig.py docs/CHANGES
diffstat 2 files changed, 30 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MoinMoin/multiconfig.py	Tue Jul 25 22:47:23 2006 +0200
@@ -0,0 +1,28 @@
+""" This is just a dummy file to overwrite MoinMoin/multiconfig.py(c) from a
+    previous moin installation.
+
+    The file moved to MoinMoin/config/multiconfig.py and you have to fix your
+    imports as shown below.
+
+    Alternatively, you can temporarily set show_configuration_error = False,
+    so some compatibility code will get activated.
+    But this compatibility code will get removed soon, so you really should
+    update your config as soon as possible.
+"""
+show_configuration_error = True
+
+if show_configuration_error:
+    from MoinMoin.error import ConfigurationError
+    raise ConfigurationError("""\
+Please edit your wikiconfig/farmconfig and fix your DefaultConfig import:\r\n
+\r\n
+Old:   from MoinMoin.multiconfig import DefaultConfig\r\n
+New:   from MoinMoin.config.multiconfig import DefaultConfig\r\n
+\r\n
+If you can't do that, but if you can change the MoinMoin code, see the file
+MoinMoin/multiconfig.py for an alternative, but temporary workaround.
+""")
+
+else:
+    from MoinMoin.config.multiconfig import *
+
--- a/docs/CHANGES	Tue Jul 25 21:27:06 2006 +0200
+++ b/docs/CHANGES	Tue Jul 25 22:47:23 2006 +0200
@@ -194,7 +194,8 @@
       at FCKeditor development or browser development.
     * HINT: instead of "from MoinMoin.multiconfig import DefaultConfig" you
       need to use "from MoinMoin.config.multiconfig import DefaultConfig" now.
-      You need to change this in you wikiconfig.py or farmconfig.py file.
+      You need to change this in your wikiconfig.py or farmconfig.py file.
+      See MoinMoin/multiconfig.py for an alternative way if you can't do that.
 
 Version 1.5.4-current:
     * increased maxlength of some input fields from 80 to 200