1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/examples/Webware/SimpleWithLoginContext/__init__.py Sat May 29 23:07:08 2004 +0000
1.3 @@ -0,0 +1,22 @@
1.4 +#!/usr/bin/env python
1.5 +
1.6 +"""
1.7 +Webware context for the Simple application (post Webware 0.8.1).
1.8 +"""
1.9 +
1.10 +from WebStack.Adapters.Webware import WebStackURLParser
1.11 +from Simple import SimpleResource
1.12 +from LoginRedirect import LoginRedirectResource, LoginRedirectAuthenticator
1.13 +
1.14 +# NOTE: Initialising a shared resource.
1.15 +
1.16 +resource = LoginRedirectResource(
1.17 + login_url="http://localhost/webkitcvs/login",
1.18 + app_url="http://localhost",
1.19 + resource=SimpleResource(),
1.20 + authenticator=LoginRedirectAuthenticator(secret_key="horses"),
1.21 + anonymous_parameter_name="anonymous"
1.22 +)
1.23 +urlParser = WebStackURLParser(resource)
1.24 +
1.25 +# vim: tabstop=4 expandtab shiftwidth=4