WebStack

examples/ModPython/CalendarApp/CalendarHandler.py

24:6fe367aff979
2004-02-01 paulb [project @ 2004-02-01 23:16:05 by paulb] Moved mod_python handlers into separate directories. Added a handler for the calendar application.
     1 #!/usr/bin/env python     2      3 # NOTE: Path manipulation requires manual customisation.     4      5 import sys     6 sys.path.append("/home/paulb/Software/Python/WebStack")     7 sys.path.append("/home/paulb/Software/Python/WebStack/examples/Common")     8      9 from WebStack.Adapters import ModPython    10 from Calendar import DirectoryResource    11     12 # NOTE: Not sure if the resource should be maintained in a resource pool.    13     14 resource = DirectoryResource()    15     16 def handler(req):    17     global resource    18     return ModPython.dispatch(req, resource, debug=1)    19     20 # vim: tabstop=4 expandtab shiftwidth=4