comparison wiki/server/moinmodpy.py @ 2975:ea78a739b5ad

imported patch fix-modpython-patch (port from 1.6)
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 05 Jan 2008 21:46:35 +0100
parents b902f2397c68
children 806cf4814612
comparison
equal deleted inserted replaced
2974:bc61a0470fd9 2975:ea78a739b5ad
46 46
47 # Debug mode - show detailed error reports 47 # Debug mode - show detailed error reports
48 ## import os 48 ## import os
49 ## os.environ['MOIN_DEBUG'] = '1' 49 ## os.environ['MOIN_DEBUG'] = '1'
50 50
51 # Set threads flag, so other code can use proper locking. 51 # Simple way
52 # TODO: It seems that modpy does not use threads, so we don't need to 52 #from MoinMoin.server.server_modpython import modpythonHandler as handler
53 # set it here. Do we have another method to check this?
54 from MoinMoin import config
55 config.use_threads = 1
56 del config
57 53
54 # Complex way
55 from MoinMoin.server.server_modpython import ModpythonConfig, modpythonHandler
58 56
59 from MoinMoin.request import request_modpython 57 class MyConfig(ModpythonConfig):
58 """ Set up local server-specific stuff here """
59
60 # Make sure moin will have permission to write to this file!
61 # Otherwise it will cause a server error.
62 logPath = "/var/log/apache2/moinlog"
63
64 # Properties
65 # Allow overriding any request property by the value defined in
66 # this dict e.g properties = {'script_name': '/mywiki'}.
67 ## properties = {}
60 68
61 def handler(request): 69 def handler(request):
62 moinreq = request_modpython.Request(request) 70 return modpythonHandler(request, MyConfig)
63 return moinreq.run(request)
64