1.1 --- a/examples/Django/simplewithloginapp.py Sat May 24 15:21:53 2008 +0000
1.2 +++ b/examples/Django/simplewithloginapp.py Sun Aug 24 20:51:10 2008 +0200
1.3 @@ -1,18 +1,23 @@
1.4 #!/usr/bin/env python
1.5
1.6 from WebStack.Adapters.Django import deploy
1.7 -from WebStack.Resources.LoginRedirect import LoginRedirectResource, LoginRedirectAuthenticator
1.8 -from Simple import SimpleResource
1.9 +from SimpleWithLogin import get_site_map
1.10 +
1.11 +# Change this to be the exact URL.
1.12 +# eg. http://localhost:8000/django/myapp/login
1.13 +
1.14 +login_url="http://localhost:8080/django/webstack/login"
1.15
1.16 -resource = LoginRedirectResource(
1.17 - login_url="http://localhost:8080/django/webstack/login",
1.18 - app_url="http://localhost:8080",
1.19 - resource=SimpleResource(),
1.20 - authenticator=LoginRedirectAuthenticator(secret_key="horses"),
1.21 - anonymous_parameter_name="anonymous",
1.22 - logout_parameter_name="logout",
1.23 - use_logout_redirect=0
1.24 -)
1.25 +# Change this to be the URL base for your server.
1.26 +# eg. http://localhost:8000
1.27 +
1.28 +app_url = "http://localhost:8080" # No trailing "/"!
1.29 +
1.30 +# Must match the key used elsewhere.
1.31 +
1.32 +secret_key = "horses" # Must match the login authenticator's key.
1.33 +
1.34 +resource = get_site_map(app_url, login_url, secret_key)
1.35
1.36 simplewithlogin = deploy(resource, handle_errors=0)
1.37