[Twisted-web] Patch for the new tree.tac example

Valentino Volonghi dialtone at gmail.com
Sun Jun 27 05:29:32 MDT 2004

Here's just a little patch for the tree.tac example just added which
uses the htmlstr loader while using xhtml to define the template.


Index: examples/tree.tac
--- examples/tree.tac   (revision 356)
+++ examples/tree.tac   (working copy)
@@ -23,8 +23,8 @@
 class TreeRenderer(rend.Page):
     __implements__ = ITreeEdit, rend.Page.__implements__
-    docFactory = loaders.htmlstr("""
+    docFactory = loaders.xmlstr("""
+<html xmlns="http://www.w3.org/1999/xhtml"
 <head><title>Tree Editor</title></head>
 <body><h1><span nevow:data="description"
                 nevow:render="string">Tree Description</span></h1>

More information about the Twisted-web mailing list