[CMF-checkins] CVS: CMF/CMFCore - FSPageTemplate.py:1.4
Chris Withers
chrisw@nipltd.com
Mon, 11 Feb 2002 07:11:33 -0500
Update of /cvs-repository/CMF/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv2550/CMFCore
Modified Files:
FSPageTemplate.py
Log Message:
Fix for Tracker #462. Also refactored FSPageTemplate a bit so it'll be marginally faster in production mode. Added a coupla basic tests for it too.
=== CMF/CMFCore/FSPageTemplate.py 1.3 => 1.4 ===
return FSPageTemplate.inheritedAttribute('pt_macros')(self)
- def pt_render(self, source=0, extra_context={}):
- # Tie in on an opportunity to auto-reload
- self._updateFromFS()
- if Globals.DevelopmentMode:
+ if Globals.DevelopmentMode:
+
+ # Redefine pt_render if in debug mode to give a bit more info
+
+ def pt_render(self, source=0, extra_context={}):
+ # Tie in on an opportunity to auto-reload
+ self._updateFromFS()
try:
return FSPageTemplate.inheritedAttribute('pt_render')( self,
source, extra_context )
@@ -102,12 +105,9 @@
err_type = err[0]
err_msg = '<pre>%s</pre>' % replace( err[1], "\'", "'" )
msg = 'FS Page Template %s has errors: %s.<br>%s' % (
- self.id, err_type, err_msg )
+ self.id, err_type, html_quote(err_msg) )
raise RuntimeError, msg
- else:
- return FSPageTemplate.inheritedAttribute('pt_render')(self,
- source, extra_context )
-
+
# Copy over more mothods
security.declareProtected(FTPAccess, 'manage_FTPget')
security.declareProtected(View, 'get_size')