# HG changeset patch # User paulb # Date 1180741178 0 # Node ID 1021a5232d7e5525d4b44ea253ae849f8f34dfd6 # Parent 8a6cfc3767dcb7be863ac10a9948a3f14037bf0a [project @ 2007-06-01 23:39:38 by paulb] Fixed the plumbing. diff -r 8a6cfc3767dc -r 1021a5232d7e examples/Common/VerySimpleWithLogin/__init__.py --- a/examples/Common/VerySimpleWithLogin/__init__.py Fri Jun 01 23:39:21 2007 +0000 +++ b/examples/Common/VerySimpleWithLogin/__init__.py Fri Jun 01 23:39:38 2007 +0000 @@ -13,6 +13,7 @@ from WebStack.Resources.Selectors import EncodingSelector, PathSelector from WebStack.Resources.Static import DirectoryResource from WebStack.Resources.Login import LoginAuthenticator +from WebStack.Resources.LoginRedirect import LoginRedirectAuthenticator import XSLForms.Resources.Login # Configuration settings. @@ -129,7 +130,7 @@ ("badger", "123"), ("vole", "abc") ] - authenticator = LoginAuthenticator(secret_key, credentials) + login_authenticator = LoginAuthenticator(secret_key, credentials) login_redirect_authenticator = LoginRedirectAuthenticator(secret_key) # Get the main resource and the directory used by the application. @@ -139,12 +140,13 @@ # Get some login resources. - login_redirect_resource = XSLForms.Resources.Login.LoginRedirectResource(secret_key) - login_resource = LoginResource( + login_redirect_resource = XSLForms.Resources.Login.LoginRedirectResource( host, + "login", # see below resource=very_simple_resource, authenticator=login_redirect_authenticator ) + login_resource = LoginResource(login_authenticator) # Make a simple Web site. @@ -165,7 +167,7 @@ # Resource preparation ahead of time - useful for making installations. def prepare_resources(): - for cls in [VerySimpleResource]: + for cls in [VerySimpleResource, LoginResource]: XSLForms.Resources.WebResources.prepare_resources(cls) # vim: tabstop=4 expandtab shiftwidth=4