[Checkins] SVN: cmf.pt/trunk/ This should be expressed using the ``bind`` method. Note that this also fixes an incompatibility with the newest ``z3c.pt`` package.

Malthe Borch mborch at gmail.com
Wed May 12 00:33:49 EDT 2010


Log message for revision 112247:
  This should be expressed using the ``bind`` method. Note that this also fixes an incompatibility with the newest ``z3c.pt`` package.

Changed:
  U   cmf.pt/trunk/CHANGES.txt
  U   cmf.pt/trunk/src/cmf/pt/fs.py

-=-
Modified: cmf.pt/trunk/CHANGES.txt
===================================================================
--- cmf.pt/trunk/CHANGES.txt	2010-05-12 03:20:25 UTC (rev 112246)
+++ cmf.pt/trunk/CHANGES.txt	2010-05-12 04:33:48 UTC (rev 112247)
@@ -1,9 +1,9 @@
 Changelog
 =========
 
-0.7 - Unreleased
-----------------
+In next release...
 
+- 
 
 0.6 - 2009-10-25
 ----------------

Modified: cmf.pt/trunk/src/cmf/pt/fs.py
===================================================================
--- cmf.pt/trunk/src/cmf/pt/fs.py	2010-05-12 03:20:25 UTC (rev 112246)
+++ cmf.pt/trunk/src/cmf/pt/fs.py	2010-05-12 04:33:48 UTC (rev 112247)
@@ -49,8 +49,8 @@
             self.read()
 
     def __call__(self, *args, **kwargs):
-        kwargs['args'] = args
-        return BaseTemplateFile.__call__(self, self, **kwargs)    
+        bound = self.bind(self)
+        return bound(*args, **kwargs)
 
     def _exec(self, bound_names, *args, **kwargs):
         # execute the template in a new security context.
@@ -67,9 +67,9 @@
 
 class FSControllerPageTemplate(FSPageTemplate, FSControllerBase, BaseCPT):
     def __init__(self, id, filepath, fullname=None, properties=None):
-        FSPageTemplate.__init__(self, id, filepath, fullname, properties)  
+        FSPageTemplate.__init__(self, id, filepath, fullname, properties)
         self.filepath = filepath
-      
+
         self._read_action_metadata(self.getId(), filepath)
         self._read_validator_metadata(self.getId(), filepath)
 



More information about the checkins mailing list