1.1 --- a/examples/WSGI/SimpleWithLoginHandler.py Thu Mar 24 17:41:03 2005 +0000
1.2 +++ b/examples/WSGI/SimpleWithLoginHandler.py Thu Mar 24 17:41:17 2005 +0000
1.3 @@ -6,23 +6,19 @@
1.4 sys.path.append("/home/paulb/Software/Python/WebStack")
1.5 sys.path.append("/home/paulb/Software/Python/WebStack/examples/Common")
1.6
1.7 -from WebStack.Adapters import WSGI
1.8 +from WebStack.Adapters.WSGI import deploy
1.9 from WebStack.Resources.LoginRedirect import LoginRedirectResource, LoginRedirectAuthenticator
1.10 from Simple import SimpleResource
1.11 -from wsgi_cgi import run_with_cgi
1.12
1.13 -resource = LoginRedirectResource(
1.14 - login_url="http://localhost/wsgi/login",
1.15 - app_url="http://localhost",
1.16 - resource=SimpleResource(),
1.17 - authenticator=LoginRedirectAuthenticator(secret_key="horses"),
1.18 - anonymous_parameter_name="anonymous",
1.19 - logout_parameter_name="logout"
1.20 +deploy(
1.21 + LoginRedirectResource(
1.22 + login_url="http://localhost/wsgi/login",
1.23 + app_url="http://localhost",
1.24 + resource=SimpleResource(),
1.25 + authenticator=LoginRedirectAuthenticator(secret_key="horses"),
1.26 + anonymous_parameter_name="anonymous",
1.27 + logout_parameter_name="logout"
1.28 + )
1.29 )
1.30
1.31 -# Special magic incantation.
1.32 -
1.33 -handler = WSGI.WSGIAdapter(resource)
1.34 -run_with_cgi(handler)
1.35 -
1.36 # vim: tabstop=4 expandtab shiftwidth=4