[mod_python] web frameworks

Byron Ellacott bje at apnic.net
Mon Apr 19 09:43:58 EST 2004


On Fri, 2004-04-16 at 17:36, Julian Ciccale wrote:
> Hi, I'm following the PyWork development (julcicc), 
> what problems did you encounter using XSLT ?

XSLT wasn't in view.ViewHandlerMap().availableViews, in fact none of the
built in view handlers were.  action.py then complained about it being
an unknown view handler.

util.action2xml() is unable to handle write-only properties, in both the
C and Python implementations.  I uploaded a patch to SourceForge in a
bug report to fix these implementations, though it looks like I wasn't
fully awake when I set the bug title. :)

There was also an unhandled exception to do with conf.py's getconfint()
for unset values: getconfint() simply called int(self.getconf(key)), but
getconf() returns "" for an unset value.  int("") throws a ValueError. 
I suggested modifying getconf() and getconfint() to take default values,
but didn't realise SourceForge's bug system would strip leading
whitespace, so the Python code's not real useful in there :(  This bug
only produces an exception when the configuration is reloaded with no
value specified for, I think, debug.

> We are still working on pywork , and planning a new release, at the
> moment we are using it in 2 production applications, and we are using
> mostly ZPT and a new PDF view handler.

PyWork seems to have promise.  I currently do my web development in Perl
using a self rolled framework, but I'm trying to reduce
interdependencies between the presentation and content, which gives me
an interest in XML/XSLT: I can tell the web people what the XML will
contain, and they can produce XSLT, and never the two shall meet. :)

ZPT, like all special-things-in-HTML templating systems, doesn't give me
a clean enough separation.  A PDF view handler is an interesting
concept, I look forward to playing with the new release.

-- 
bje


More information about the Mod_python mailing list