[Checkins] SVN: five.pt/trunk/ Default to Zope 2 application server debug mode as the default reload setting.
Malthe Borch
mborch at gmail.com
Thu Mar 24 13:42:08 EDT 2011
Log message for revision 121118:
Default to Zope 2 application server debug mode as the default reload setting.
Changed:
U five.pt/trunk/CHANGES.txt
U five.pt/trunk/src/five/pt/pagetemplate.py
-=-
Modified: five.pt/trunk/CHANGES.txt
===================================================================
--- five.pt/trunk/CHANGES.txt 2011-03-24 16:09:52 UTC (rev 121117)
+++ five.pt/trunk/CHANGES.txt 2011-03-24 17:42:08 UTC (rev 121118)
@@ -1,6 +1,12 @@
Changelog
=========
+In next release...
+
+- Set default reload mode to the Zope 2 application server
+ configuration's ``debug_mode`` value.
+ [malthe]
+
2.0-rc1 (2011-02-28)
~~~~~~~~~~~~~~~~~~~~
Modified: five.pt/trunk/src/five/pt/pagetemplate.py
===================================================================
--- five.pt/trunk/src/five/pt/pagetemplate.py 2011-03-24 16:09:52 UTC (rev 121117)
+++ five.pt/trunk/src/five/pt/pagetemplate.py 2011-03-24 17:42:08 UTC (rev 121118)
@@ -7,6 +7,8 @@
from Acquisition import aq_inner
from Acquisition import aq_parent
from AccessControl import getSecurityManager
+from App.config import getConfiguration
+
from Products.PageTemplates.Expressions import SecureModuleImporter
from chameleon.tales import StringExpr
@@ -65,6 +67,10 @@
'nocall': NocallExpr,
}
+ # We enable template reload setting in application debug-mode
+ if getConfiguration().debug_mode:
+ auto_reload = True
+
def render_macro(self, macro, parameters=None, **kw):
context = self._pt_get_context(None, None)
@@ -113,7 +119,7 @@
"""Zope 2-compatible page template file class."""
-class ViewPageTemplate(pagetemplate.ViewPageTemplate):
+class ViewPageTemplate(pagetemplate.ViewPageTemplate, BaseTemplateBase):
expression_types = {
'python': PythonExpr,
More information about the checkins
mailing list