paulb@307 | 1 | #!/usr/bin/env python |
paulb@307 | 2 | |
paulb@570 | 3 | # Uncomment and adjust the paths below if WebStack is not installed somewhere |
paulb@570 | 4 | # on the PYTHONPATH. |
paulb@307 | 5 | |
paulb@570 | 6 | #import sys |
paulb@570 | 7 | #sys.path.append("/home/paulb/Software/Python/WebStack") |
paulb@570 | 8 | #sys.path.append("/home/paulb/Software/Python/WebStack/examples/Common") |
paulb@307 | 9 | |
paulb@325 | 10 | from WebStack.Adapters.WSGI import deploy |
paulb@307 | 11 | from WebStack.Resources.LoginRedirect import LoginRedirectResource, LoginRedirectAuthenticator |
paulb@307 | 12 | from Simple import SimpleResource |
paulb@307 | 13 | |
paulb@325 | 14 | deploy( |
paulb@325 | 15 | LoginRedirectResource( |
paulb@325 | 16 | login_url="http://localhost/wsgi/login", |
paulb@325 | 17 | app_url="http://localhost", |
paulb@325 | 18 | resource=SimpleResource(), |
paulb@325 | 19 | authenticator=LoginRedirectAuthenticator(secret_key="horses"), |
paulb@325 | 20 | anonymous_parameter_name="anonymous", |
paulb@325 | 21 | logout_parameter_name="logout" |
paulb@325 | 22 | ) |
paulb@307 | 23 | ) |
paulb@307 | 24 | |
paulb@307 | 25 | # vim: tabstop=4 expandtab shiftwidth=4 |