1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/examples/ModPython/VerySimpleWithLoginApp/VerySimpleWithLoginHandler.py Sun Jun 10 22:50:13 2007 +0000
1.3 @@ -0,0 +1,25 @@
1.4 +#!/usr/bin/env python
1.5 +
1.6 +# NOTE: Path manipulation requires manual customisation.
1.7 +
1.8 +import sys
1.9 +#sys.path.append("/home/paulb/Software/Python/WebStack")
1.10 +#sys.path.append("/home/paulb/Software/Python/XSLTools")
1.11 +#sys.path.append("/home/paulb/Software/Python/XSLTools/examples/Common")
1.12 +#sys.path.append("/home/paulb/Software/Python/libxml2dom")
1.13 +
1.14 +from WebStack.Adapters import ModPython
1.15 +import VerySimpleWithLogin
1.16 +
1.17 +# Get a simple Web site.
1.18 +
1.19 +host = "http://192.168.1.99" # or an absolute URL (without path)
1.20 +resource = VerySimpleWithLogin.get_site(host, use_redirect=0)
1.21 +
1.22 +# NOTE: Not sure if the resource should be maintained in a resource pool.
1.23 +
1.24 +def handler(req):
1.25 + global resource
1.26 + return ModPython.respond(req, resource, handle_errors=0)
1.27 +
1.28 +# vim: tabstop=4 expandtab shiftwidth=4