comparison 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
comparison
equal deleted inserted replaced
4617:8a3c0c726d66 4618:0e7c007f8ed9
4 """ 4 """
5 import os 5 import os
6 6
7 from MoinMoin.script.server.standalone import DefaultConfig 7 from MoinMoin.script.server.standalone import DefaultConfig
8 8
9 class Config(DefaultConfig): 9 class LocalConfig(DefaultConfig):
10 port = 8080 # if you use port < 1024, you need to start as root 10 port = 8080 # if you use port < 1024, you need to start as root
11 11
12 # if you start the server as root, the standalone server can change 12 # if you start the server as root, the standalone server can change
13 # to this user and group, e.g. 'www-data' 13 # to this user and group, e.g. 'www-data'
14 #user = '' 14 #user = ''
38 # For convenience, the default behaviour (see below) is to read the 38 # For convenience, the default behaviour (see below) is to read the
39 # environment variable MOIN_DEBUGGER. Setting it to True will enable the 39 # environment variable MOIN_DEBUGGER. Setting it to True will enable the
40 # debugger, anything else (or not setting it) will disable the debugger. 40 # debugger, anything else (or not setting it) will disable the debugger.
41 debug = os.environ.get('MOIN_DEBUGGER', 'False') == 'True' 41 debug = os.environ.get('MOIN_DEBUGGER', 'False') == 'True'
42 42
43 # DEVELOPERS! Do not add your configuration items there,
44 # you could accidentally commit them! Instead, create a
45 # wikiserverconfig_local.py file containing this:
46 #
47 # from wikiserverconfig import LocalConfig
48 #
49 # class Config(LocalConfig):
50 # configuration_item_1 = 'value1'
51 #
52
53 try:
54 from wikiserverconfig_local import Config
55 except ImportError, err:
56 if not str(err).endswith('wikiserverconfig_local'):
57 raise
58 Config = LocalConfig