1 #!/usr/bin/env python 2 3 # NOTE: Path manipulation requires manual customisation. 4 5 import sys 6 sys.path.append("/home/paulb/Software/Python/WebStack") 7 sys.path.append("/home/paulb/Software/Python/WebStack/examples/Common") 8 9 from WebStack.Adapters.CGI import deploy 10 from WebStack.Resources.LoginRedirect import LoginRedirectResource, LoginRedirectAuthenticator 11 from Simple import SimpleResource 12 13 deploy( 14 LoginRedirectResource( 15 login_url="http://localhost/cgi/login", # Change this to be the exact URL on your server. 16 # eg. http://localhost:8000/cgi/LoginHandler.py 17 app_url="http://localhost", # Change this to be the URL base for your server. 18 # eg. http://localhost:8000 19 # Note that the login application can be placed on 20 # a different server if desirable. 21 resource=SimpleResource(), 22 authenticator=LoginRedirectAuthenticator(secret_key="horses"), 23 anonymous_parameter_name="anonymous", 24 logout_parameter_name="logout" 25 ), 26 handle_errors=1 27 ) 28 29 # vim: tabstop=4 expandtab shiftwidth=4