[Twisted-Python] Patch to allow page.Page to work correctly (well from my point of view :-)

Luc Stepniewski lstep at adequat.net
Thu Feb 13 17:11:20 MST 2003


Hey it's my first patch on twisted !!! I have to celebrate this day!

When you instanciate a page.Page instance, if you specify a templateFile as 
parameter, twisted will try to find it in the twisted modules directory, 
which is not so cool. There's a templateDirectory parameter somewhere in 
woven, but it is not passed to the view. So here is the patch:

--- page.py.old     Sun Jan  5 06:16:04 2003
+++ page.py        Fri Feb 14 01:05:15 2003
@@ -10,7 +10,7 @@
     __implements__ = (model.Model.__implements__, view.View.__implements__,
                       controller.Controller.__implements__)
     def __init__(self, m=None, templateFile=None, inputhandlers=None,
-                controllers=None,
+                controllers=None, templateDirectory=None,
                  *args, **kwargs):
         model.Model.__init__(self, *args, **kwargs)
         if m is None:
@@ -22,7 +22,7 @@
                                        controllers=controllers)
         self.view = self
         view.View.__init__(self, self.model, controller=self,
-                           templateFile=templateFile)
+                           templateFile=templateFile, 
templateDirectory=templateDirectory)
         self.controller = self
         self.controllerRendered = 0





More information about the Twisted-Python mailing list