paulb@139 | 1 | #!/usr/bin/env python |
paulb@139 | 2 | |
paulb@539 | 3 | # NOTE: Path manipulation may require manual customisation. |
paulb@139 | 4 | |
paulb@539 | 5 | import sys, os |
paulb@539 | 6 | sys.path.append(os.path.abspath(os.path.join(__file__, "../../../Common"))) |
paulb@139 | 7 | |
paulb@560 | 8 | from WebStack.Adapters.ModPython import deploy |
paul@765 | 9 | from SimpleWithLogin import get_site_map |
paul@765 | 10 | |
paul@765 | 11 | # Change this to be the exact URL. |
paul@765 | 12 | # eg. http://localhost:8000/myapp/login |
paul@765 | 13 | |
paul@765 | 14 | login_url = "http://localhost/login/app" |
paul@765 | 15 | |
paul@765 | 16 | # Change this to be the URL base for your server. |
paul@765 | 17 | # eg. http://localhost:8000 |
paul@765 | 18 | |
paul@765 | 19 | app_url = "http://localhost" # No trailing "/"! |
paul@765 | 20 | |
paul@765 | 21 | # Must match the key used elsewhere. |
paul@765 | 22 | |
paul@765 | 23 | secret_key = "horses" |
paul@765 | 24 | |
paul@765 | 25 | resource = get_site_map(app_url, login_url, secret_key) |
paulb@139 | 26 | |
paulb@139 | 27 | # NOTE: Not sure if the resource should be maintained in a resource pool. |
paulb@139 | 28 | |
paulb@718 | 29 | handler, _no_authentication = deploy(resource, handle_errors=0) |
paulb@139 | 30 | |
paulb@139 | 31 | # vim: tabstop=4 expandtab shiftwidth=4 |