1.1 --- a/examples/CGI/SimpleWithLoginHandler.py Thu Mar 24 17:40:50 2005 +0000
1.2 +++ b/examples/CGI/SimpleWithLoginHandler.py Thu Mar 24 17:41:03 2005 +0000
1.3 @@ -6,18 +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 CGI
1.8 +from WebStack.Adapters.CGI import deploy
1.9 from WebStack.Resources.LoginRedirect import LoginRedirectResource, LoginRedirectAuthenticator
1.10 from Simple import SimpleResource
1.11
1.12 -resource = LoginRedirectResource(
1.13 - login_url="http://localhost/cgi/login",
1.14 - app_url="http://localhost",
1.15 - resource=SimpleResource(),
1.16 - authenticator=LoginRedirectAuthenticator(secret_key="horses"),
1.17 - anonymous_parameter_name="anonymous",
1.18 - logout_parameter_name="logout"
1.19 +deploy(
1.20 + LoginRedirectResource(
1.21 + login_url="http://localhost/cgi/login",
1.22 + app_url="http://localhost",
1.23 + resource=SimpleResource(),
1.24 + authenticator=LoginRedirectAuthenticator(secret_key="horses"),
1.25 + anonymous_parameter_name="anonymous",
1.26 + logout_parameter_name="logout"
1.27 + )
1.28 )
1.29 -CGI.respond(resource)
1.30
1.31 # vim: tabstop=4 expandtab shiftwidth=4