1.1 --- a/WebStack/Adapters/ModPython.py Sun Jan 15 23:18:29 2006 +0000
1.2 +++ b/WebStack/Adapters/ModPython.py Sun Jan 15 23:20:27 2006 +0000
1.3 @@ -24,6 +24,22 @@
1.4 from WebStack.Generic import EndOfResponse
1.5 from mod_python import apache
1.6
1.7 +def deploy(resource, authenticator=None, address=None, handle_errors=1):
1.8 +
1.9 + """
1.10 + Deploy the given 'resource' and optional 'authenticator'.
1.11 + The optional 'handle_errors' flag, if set to false, causes tracebacks to be
1.12 + displayed in the browser.
1.13 +
1.14 + The optional 'address' parameter is deliberately ignored.
1.15 + """
1.16 +
1.17 + def _respond(request):
1.18 + return respond(request, resource, handle_errors=handle_errors)
1.19 + def _authenticate(request):
1.20 + return authenticate(request, authenticator, handle_errors=handle_errors)
1.21 + return _respond, _authenticate
1.22 +
1.23 def respond(request, resource, handle_errors=1):
1.24
1.25 """