# HG changeset patch # User paulb # Date 1082848181 0 # Node ID 546631227bcc566a0ab12629e1c69e15ee780c9b # Parent cd5b1fe37aef6eef333986b7bb1aebf2cff9e44d [project @ 2004-04-24 23:09:39 by paulb] Added cookie test. diff -r cd5b1fe37aef -r 546631227bcc examples/Webware/CookiesApp/Properties.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/Webware/CookiesApp/Properties.py Sat Apr 24 23:09:41 2004 +0000 @@ -0,0 +1,15 @@ +#!/usr/bin/env python + +name = "Cookies" + +version = (0, 1, 0) + +status = "alpha" + +releaseDate = "?" + +requiredPyVersion = (2, 2, 0) + +synopsis = "A simple WebStack application." + +# vim: tabstop=4 expandtab shiftwidth=4 diff -r cd5b1fe37aef -r 546631227bcc examples/Webware/CookiesApp/__init__.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/Webware/CookiesApp/__init__.py Sat Apr 24 23:09:41 2004 +0000 @@ -0,0 +1,25 @@ +#!/usr/bin/env python + +""" +Webware plug-in code. +""" + +__version__ = "0.1" + +from WebStack.Adapters.Webware import WebStackServletFactory +from Cookies import CookiesResource + +# NOTE: Initialising a shared resource. + +resource = CookiesResource() + +def InstallInWebKit(appServer): + global resource + app = appServer.application() + + # NOTE: Allow .cookies 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, [".cookies"])) + +# vim: tabstop=4 expandtab shiftwidth=4 diff -r cd5b1fe37aef -r 546631227bcc examples/Webware/CookiesContext/__init__.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/Webware/CookiesContext/__init__.py Sat Apr 24 23:09:41 2004 +0000 @@ -0,0 +1,15 @@ +#!/usr/bin/env python + +""" +Webware context for the Cookies application (post Webware 0.8.1). +""" + +from WebStack.Adapters.Webware import WebStackURLParser +from Cookies import CookiesResource + +# NOTE: Initialising a shared resource. + +resource = CookiesResource() +urlParser = WebStackURLParser(resource) + +# vim: tabstop=4 expandtab shiftwidth=4