1.1 --- a/examples/ModPython/SimpleWithLoginApp/SimpleWithLoginHandler.py Sun Jan 15 23:22:13 2006 +0000
1.2 +++ b/examples/ModPython/SimpleWithLoginApp/SimpleWithLoginHandler.py Sun Jan 15 23:23:29 2006 +0000
1.3 @@ -5,14 +5,14 @@
1.4 import sys, os
1.5 sys.path.append(os.path.abspath(os.path.join(__file__, "../../../Common")))
1.6
1.7 -from WebStack.Adapters import ModPython
1.8 +from WebStack.Adapters.ModPython import deploy
1.9 from WebStack.Resources.LoginRedirect import LoginRedirectResource, LoginRedirectAuthenticator
1.10 from Simple import SimpleResource
1.11
1.12 # NOTE: Not sure if the resource should be maintained in a resource pool.
1.13
1.14 resource = LoginRedirectResource(
1.15 - login_url="http://localhost/login/app.login",
1.16 + login_url="http://localhost/login/app",
1.17 app_url="http://localhost",
1.18 resource=SimpleResource(),
1.19 authenticator=LoginRedirectAuthenticator(secret_key="horses"),
1.20 @@ -21,7 +21,6 @@
1.21 use_logout_redirect=0
1.22 )
1.23
1.24 -def handler(req):
1.25 - return ModPython.respond(req, resource, handle_errors=0)
1.26 +handler, _no_authentication = deploy(resource, handle_errors=0)
1.27
1.28 # vim: tabstop=4 expandtab shiftwidth=4