[Zope3-checkins] CVS: Zope3/src/zope/pagetemplate - pagetemplate.py:1.2.8.3
Godefroid Chapelle
gotcha@swing.be
Fri, 14 Mar 2003 06:00:43 -0500
Update of /cvs-repository/Zope3/src/zope/pagetemplate
In directory cvs.zope.org:/tmp/cvs-serv11485
Modified Files:
Tag: template_usage-branch
pagetemplate.py
Log Message:
can now test with tal:condition="usage"
=== Zope3/src/zope/pagetemplate/pagetemplate.py 1.2.8.2 => 1.2.8.3 ===
--- Zope3/src/zope/pagetemplate/pagetemplate.py:1.2.8.2 Thu Mar 13 12:50:53 2003
+++ Zope3/src/zope/pagetemplate/pagetemplate.py Fri Mar 14 06:00:13 2003
@@ -221,6 +221,10 @@
else:
return None
+ def __nonzero__(self):
+ return self.stringValue <> u''
+
+
class PTRuntimeError(RuntimeError):
'''The Page Template has template errors that prevent it from rendering.'''