WebStack

examples/JavaServlet/SimpleWithLoginApp.py

765:c74377ab32be
2008-08-24 Paul Boddie Fixed DirectoryRepository to create the directory if missing. Changed the SimpleWithLogin example to provide the full site map, altering the specific deployments accordingly. Changed the demo to make use of the revised SimpleWithLogin and new SimpleWithOpenID examples.
     1 #!/usr/bin/env python     2      3 from WebStack.Adapters.JavaServlet import deploy     4 from SimpleWithLogin import get_site_map     5      6 # Change this to be the exact URL.     7 # eg. http://localhost:8000/cgi/myapp/requestid     8      9 login_url = "http://localhost:8080/SimpleWithLoginApp/login"    10     11 # Change this to be the URL base for your server.    12 # eg. http://localhost:8000    13     14 app_url = "http://localhost:8080" # No trailing "/"!    15     16 # Must match the key used elsewhere.    17     18 secret_key = "horses"    19     20 resource = get_site_map(app_url, login_url, secret_key)    21     22 # NOTE: Not sure if the resource should be maintained in a resource pool.    23     24 SimpleWithLoginApp = deploy(resource, handle_errors=0)    25     26 # vim: tabstop=4 expandtab shiftwidth=4