[Twisted-Python] fzZzy: patch for t/web/woven/template.py
Thomas Raschbacher
lordvan at lordvan.com
Fri Dec 6 15:26:32 EST 2002
Hi!
cuz i needed it i fixed that bug with DOMTemplate stuff not accepting
self.template="some string"
maybe there should be checked too if templateFile&Dir are specified(and
should be used then .. but that's your choice ;)
greetings, LordVan
--- /usr/portage/distfiles/cvs-src/Twisted/twisted/web/woven/template.py
2
002-11-25 08:42:55.000000000 +0100
+++ /usr/lib/python2.2/site-packages/twisted/web/woven/template.py
2002-12-
06 21:20:57.000000000 +0100
@@ -188,7 +188,7 @@
"""
Resource.__init__(self)
if templateFile:
- self.templateFile = templateFile
+ self.templateFile = templateFile
self.outstandingCallbacks = 0
self.failed = 0
@@ -225,6 +225,8 @@
as the template. The first time the template is used it is cached
for speed.
"""
+ if self.template:
+ return microdom.parseString(self.template)
if not self.templateDirectory:
mod = sys.modules[self.__module__]
if hasattr(mod, '__file__'):
--
-----BEGIN GEEK CODE BLOCK-----
GCS/CC/E/M/MU/S d- s: a--- C++++(++) UL++++ P+ L++++ E W+++ N+++ o-- K w-- O
M-- V- PS+ PE-- Y++ PGP+++ t+++ 5+ X- R tv b++++ DI- D+ G++ e-->+++++ h-- !r
z-
------END GEEK CODE BLOCK------
-----------------------------------------
This email was sent using SquirrelMail.
"Webmail for nuts!"
http://squirrelmail.org/
More information about the Twisted-Python
mailing list