# HG changeset patch # User paulb # Date 1095782335 0 # Node ID a20cc96bebed4520f14975371eb298fde844c41e # Parent 65b9eb613d669a854983066247f6ed877d2851fa [project @ 2004-09-21 15:58:55 by paulb] Added the Unicode example for Webware 0.8.1. diff -r 65b9eb613d66 -r a20cc96bebed examples/Webware/UnicodeApp/Properties.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/Webware/UnicodeApp/Properties.py Tue Sep 21 15:58:55 2004 +0000 @@ -0,0 +1,15 @@ +#!/usr/bin/env python + +name = "Unicode" + +version = (0, 1, 0) + +status = "alpha" + +releaseDate = "?" + +requiredPyVersion = (2, 2, 0) + +synopsis = "A test of Unicode within WebStack." + +# vim: tabstop=4 expandtab shiftwidth=4 diff -r 65b9eb613d66 -r a20cc96bebed examples/Webware/UnicodeApp/__init__.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/Webware/UnicodeApp/__init__.py Tue Sep 21 15:58:55 2004 +0000 @@ -0,0 +1,25 @@ +#!/usr/bin/env python + +""" +Webware plug-in code. +""" + +__version__ = "0.1" + +from WebStack.Adapters.Webware import WebStackServletFactory +from Unicode import UnicodeResource + +# NOTE: Initialising a shared resource. + +resource = UnicodeResource() + +def InstallInWebKit(appServer): + global resource, authenticator + app = appServer.application() + + # NOTE: Allow .unicode 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, [".unicode"])) + +# vim: tabstop=4 expandtab shiftwidth=4