[Checkins] SVN: cmf.pt/trunk/ The 'func_code' attribute of file-system page templates should simulate a function taking no arguments.
Malthe Borch
mborch at gmail.com
Wed Dec 17 06:44:24 EST 2008
Log message for revision 94140:
The 'func_code' attribute of file-system page templates should simulate a function taking no arguments.
Changed:
U cmf.pt/trunk/CHANGES.txt
U cmf.pt/trunk/src/cmf/pt/cmf.py
-=-
Modified: cmf.pt/trunk/CHANGES.txt
===================================================================
--- cmf.pt/trunk/CHANGES.txt 2008-12-17 06:42:43 UTC (rev 94139)
+++ cmf.pt/trunk/CHANGES.txt 2008-12-17 11:44:23 UTC (rev 94140)
@@ -1,11 +1,12 @@
Changelog
=========
-HEAD
-~~~~
+In next release
+ - The ``func_code`` attribute of file-system page templates should
+ simulate a function taking no arguments.
+
cmf.pt 0.1 (released 11/29/2008)
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- Initial release.
+ - Initial release.
Modified: cmf.pt/trunk/src/cmf/pt/cmf.py
===================================================================
--- cmf.pt/trunk/src/cmf/pt/cmf.py 2008-12-17 06:42:43 UTC (rev 94139)
+++ cmf.pt/trunk/src/cmf/pt/cmf.py 2008-12-17 11:44:23 UTC (rev 94140)
@@ -9,6 +9,7 @@
from Products.CMFFormController.FSControllerBase import FSControllerBase
from Shared.DC.Scripts.Script import Script
+from Shared.DC.Scripts.Signature import FuncCode
from AccessControl import ClassSecurityInfo
from RestrictedPython import Utilities
@@ -22,15 +23,18 @@
_default_bindings = {'name_subpath': 'traverse_subpath'}
+ func_defaults = None
+ func_code = FuncCode((), 0)
+
utility_builtins = Utilities.utility_builtins
-
+
def __init__(self, id, filepath, fullname=None, properties=None):
FSObject.__init__(self, id, filepath, fullname, properties)
self.ZBindings_edit(self._default_bindings)
# instantiate page template
BaseTemplateFile.__init__(self, filepath)
-
+
def _readFile(self, reparse):
# templates are lazy
if reparse:
@@ -40,10 +44,6 @@
kwargs['args'] = args
return BaseTemplateFile.__call__(self, self, **kwargs)
- @property
- def func_code(self):
- return self.render.func_code
-
class FSControllerPageTemplate(FSPageTemplate, FSControllerBase, BaseCPT):
def __init__(self, id, filepath, fullname=None, properties=None):
FSPageTemplate.__init__(self, id, filepath, fullname, properties)
More information about the Checkins
mailing list