# HG changeset patch # User paulb # Date 1095782317 0 # Node ID 8344aaf5899324fb2af4154f4e3c0f0a7cb8da1e # Parent 10e4e02d8a1b2fc92b09a59aaabb313710c3fa68 [project @ 2004-09-21 15:58:37 by paulb] Added the session example for Webware 0.8.1, although it doesn't work. diff -r 10e4e02d8a1b -r 8344aaf58993 examples/Webware/SessionsApp/Properties.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/Webware/SessionsApp/Properties.py Tue Sep 21 15:58:37 2004 +0000 @@ -0,0 +1,15 @@ +#!/usr/bin/env python + +name = "Sessions" + +version = (0, 1, 0) + +status = "alpha" + +releaseDate = "?" + +requiredPyVersion = (2, 2, 0) + +synopsis = "A test of sessions within WebStack." + +# vim: tabstop=4 expandtab shiftwidth=4 diff -r 10e4e02d8a1b -r 8344aaf58993 examples/Webware/SessionsApp/__init__.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/Webware/SessionsApp/__init__.py Tue Sep 21 15:58:37 2004 +0000 @@ -0,0 +1,25 @@ +#!/usr/bin/env python + +""" +Webware plug-in code. +""" + +__version__ = "0.1" + +from WebStack.Adapters.Webware import WebStackServletFactory +from Sessions import SessionsResource + +# NOTE: Initialising a shared resource. + +resource = SessionsResource() + +def InstallInWebKit(appServer): + global resource + app = appServer.application() + + # NOTE: Allow .sessions files only. Really, we'd like any kind of file, but + # NOTE: that would severely undermine the servlet factory concept. + + app.addServletFactory(WebStackServletFactory(app, resource, [".sessions"])) + +# vim: tabstop=4 expandtab shiftwidth=4