[Zope3-checkins] SVN: Zope3/trunk/src/zope/pagetemplate/pagetemplate.py While I was working on functional tests, I found the scenario when this

Stephan Richter srichter at cosmos.phy.tufts.edu
Tue Jul 13 11:01:30 EDT 2004


Log message for revision 26444:
  While I was working on functional tests, I found the scenario when this 
  path is chosen, which is when you get the source (for editing for 
  example) and macro expansion is turned on. It is perfectly fine to pass 
  an empty dict at this point, since the template itself is not evaluated.
  


Changed:
  U   Zope3/trunk/src/zope/pagetemplate/pagetemplate.py


-=-
Modified: Zope3/trunk/src/zope/pagetemplate/pagetemplate.py
===================================================================
--- Zope3/trunk/src/zope/pagetemplate/pagetemplate.py	2004-07-13 10:50:41 UTC (rev 26443)
+++ Zope3/trunk/src/zope/pagetemplate/pagetemplate.py	2004-07-13 15:01:30 UTC (rev 26444)
@@ -164,8 +164,9 @@
             if not self.expand:
                 return self._text
             try:
-                # XXX not clear how this ever gets called, but the
-                # first arg to pt_render() needs to change if it ever does.
+                # This gets called, if macro expansion is turned on.
+                # Note that an empty dictionary is fine for the context at
+                # this point, since we are not evaluating the template. 
                 return self.pt_render({}, source=1)
             except:
                 return ('%s\n Macro expansion failed\n %s\n-->\n%s' %



More information about the Zope3-Checkins mailing list