paulb@24 | 1 | #!/usr/bin/env python |
paulb@24 | 2 | |
paulb@24 | 3 | # NOTE: Path manipulation requires manual customisation. |
paulb@24 | 4 | |
paulb@24 | 5 | import sys |
paulb@24 | 6 | sys.path.append("/home/paulb/Software/Python/WebStack") |
paulb@24 | 7 | sys.path.append("/home/paulb/Software/Python/WebStack/examples/Common") |
paulb@24 | 8 | |
paulb@24 | 9 | from WebStack.Adapters import ModPython |
paulb@416 | 10 | from Calendar import CalendarResource |
paulb@24 | 11 | |
paulb@24 | 12 | # NOTE: Not sure if the resource should be maintained in a resource pool. |
paulb@493 | 13 | # Choose or customise one of the following if the example fails. |
paulb@24 | 14 | |
paulb@416 | 15 | resource = CalendarResource() |
paulb@493 | 16 | #resource = CalendarResource("iso-8859-1") |
paulb@24 | 17 | |
paulb@24 | 18 | def handler(req): |
paulb@24 | 19 | global resource |
paulb@341 | 20 | return ModPython.respond(req, resource, handle_errors=0) |
paulb@24 | 21 | |
paulb@24 | 22 | # vim: tabstop=4 expandtab shiftwidth=4 |