22
22
look into INSTALL.html to see how you can fix the bug on your own
23
23
(a simple one line change).
26
25
@copyright: 2004-2005 by Oliver Graf <ograf@bitart.de>
27
26
@license: GNU GPL, see COPYING for details.
30
# System path configuration
34
# Path to MoinMoin package, needed if you installed with --prefix=PREFIX
35
# or if you did not use setup.py.
36
## sys.path.insert(0, 'PREFIX/lib/python2.3/site-packages')
38
# Path of the directory where wikiconfig.py is located.
39
# YOU NEED TO CHANGE THIS TO MATCH YOUR SETUP.
40
sys.path.insert(0, '/path/to/wikiconfig')
42
# Path of the directory where farmconfig is located (if different).
43
## sys.path.insert(0, '/path/to/farmconfig')
31
# a) Configuration of Python's code search path
32
# If you already have set up the PYTHONPATH environment variable for the
33
# stuff you see below, you don't need to do a1) and a2).
35
# a1) Path of the directory where the MoinMoin code package is located.
36
# Needed if you installed with --prefix=PREFIX or you didn't use setup.py.
37
#sys.path.insert(0, 'PREFIX/lib/python2.3/site-packages')
39
# a2) Path of the directory where wikiconfig.py / farmconfig.py is located.
40
# See wiki/config/... for some sample config files.
41
#sys.path.insert(0, '/path/to/wikiconfigdir')
42
#sys.path.insert(0, '/path/to/farmconfigdir')
44
# b) Configuration of moin's logging
45
# If you have set up MOINLOGGINGCONF environment variable, you don't need this!
46
# You also don't need this if you are happy with the builtin defaults.
47
# See wiki/config/logging/... for some sample config files.
48
#from MoinMoin import log
49
#log.load_config('/path/to/logging_configuration_file')
45
51
# Debug mode - show detailed error reports
47
## os.environ['MOIN_DEBUG'] = '1'
49
# Set threads flag, so other code can use proper locking.
50
# TODO: It seems that modpy does not use threads, so we don't need to
51
# set it here. Do we have another method to check this?
52
from MoinMoin import config
53
config.use_threads = 1
57
from MoinMoin.request import RequestModPy
52
#os.environ['MOIN_DEBUG'] = '1'
55
from MoinMoin.server.server_modpython import ModpythonConfig, modpythonHandler
57
class MyConfig(ModpythonConfig):
58
""" Set up local server-specific stuff here """
60
# Allow overriding any request property by the value defined in
61
# this dict e.g properties = {'script_name': '/mywiki'}.
59
64
def handler(request):
60
moinreq = RequestModPy(request)
61
return moinreq.run(request)
65
return modpythonHandler(request, MyConfig)