[Zope3-checkins] CVS: Zope3/src/zope/app/pagetemplate - talesapi.py:1.7

Stephan Richter srichter at cosmos.phy.tufts.edu
Tue Sep 16 18:11:56 EDT 2003


Update of /cvs-repository/Zope3/src/zope/app/pagetemplate
In directory cvs.zope.org:/tmp/cvs-serv13611/src/zope/app/pagetemplate

Modified Files:
	talesapi.py 
Log Message:
Now TALES namesspaces have access to the context (engine) of the program.
This way they can use 'request' and all other defined variables. All name-
spaces have to implement 'ITALESFunctionNamespace' now. 

Currently the interface only specifies a setEngine() method, which is not
that user friendly. We might want to make a couple convinience methods 
available aas well later.


=== Zope3/src/zope/app/pagetemplate/talesapi.py 1.6 => 1.7 ===
--- Zope3/src/zope/app/pagetemplate/talesapi.py:1.6	Fri Jun 13 13:41:19 2003
+++ Zope3/src/zope/app/pagetemplate/talesapi.py	Tue Sep 16 18:11:26 2003
@@ -16,19 +16,22 @@
 
 $Id$
 """
-
 from zope.app.interfaces.talesapi import IZopeTalesAPI
 from zope.app.interfaces.dublincore import IZopeDublinCore
 from zope.app.interfaces.size import ISized
 from zope.app import zapi
 from zope.interface import implements
+from zope.tales.interfaces import ITALESFunctionNamespace
 
 class ZopeTalesAPI(object):
 
-    implements(IZopeTalesAPI)
+    implements(IZopeTalesAPI, ITALESFunctionNamespace)
 
     def __init__(self, context):
         self.context = context
+
+    def setEngine(self, engine):
+        self._engine = engine
 
     def title(self):
         a = zapi.queryAdapter(self.context, IZopeDublinCore)




More information about the Zope3-Checkins mailing list