[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/pagetemplate/ remove the IZopeTalesAPI, which is a decoy, and confuses things

Fred L. Drake, Jr. fdrake at gmail.com
Mon Dec 20 13:17:18 EST 2004


Log message for revision 28653:
  remove the IZopeTalesAPI, which is a decoy, and confuses things

Changed:
  U   Zope3/trunk/src/zope/app/pagetemplate/configure.zcml
  U   Zope3/trunk/src/zope/app/pagetemplate/interfaces.py
  U   Zope3/trunk/src/zope/app/pagetemplate/talesapi.py

-=-
Modified: Zope3/trunk/src/zope/app/pagetemplate/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/pagetemplate/configure.zcml	2004-12-19 16:06:25 UTC (rev 28652)
+++ Zope3/trunk/src/zope/app/pagetemplate/configure.zcml	2004-12-20 18:17:18 UTC (rev 28653)
@@ -6,12 +6,6 @@
 
   <adapter
       for="*"
-      provides=".interfaces.IZopeTalesAPI"
-      factory=".talesapi.ZopeTalesAPI" 
-      />
-
-  <adapter
-      for="*"
       provides="zope.app.traversing.interfaces.IPathAdapter"
       factory=".talesapi.ZopeTalesAPI"
       name="zope" 

Modified: Zope3/trunk/src/zope/app/pagetemplate/interfaces.py
===================================================================
--- Zope3/trunk/src/zope/app/pagetemplate/interfaces.py	2004-12-19 16:06:25 UTC (rev 28652)
+++ Zope3/trunk/src/zope/app/pagetemplate/interfaces.py	2004-12-20 18:17:18 UTC (rev 28653)
@@ -17,33 +17,11 @@
 """
 __docformat__ = 'restructuredtext'
 
-from zope.app.dublincore.interfaces import IDCDescriptiveProperties
-from zope.app.dublincore.interfaces import IDCTimes
-from zope.interface import Interface
+import zope.interface
 
-class IZopeTalesAPI(IDCDescriptiveProperties, IDCTimes):
 
-    def name():
-        """Return the object's name
+class IURLQuote(zope.interface.Interface):
 
-        This is the name the object is stored under in the container
-        it was accessed in.
-        """
-
-    def title_or_name():
-        """Return the title, if the is one, or the name otherwise
-        """
-
-    def size():
-        """Return a string representing the size of the object
-
-        This string could be a collection of digits or a descriptive
-        string of some sort.  If the size can't be determined
-        (e.g. the object has no size), an empty string is returned.
-        """
-    
-class IURLQuote(Interface):
-
     def quote():
         """Return the objects URL quote representation."""
 
@@ -55,4 +33,3 @@
 
     def unquote_plus():
         """Return the objects URL unquote_plus  representation."""
-

Modified: Zope3/trunk/src/zope/app/pagetemplate/talesapi.py
===================================================================
--- Zope3/trunk/src/zope/app/pagetemplate/talesapi.py	2004-12-19 16:06:25 UTC (rev 28652)
+++ Zope3/trunk/src/zope/app/pagetemplate/talesapi.py	2004-12-20 18:17:18 UTC (rev 28653)
@@ -17,17 +17,19 @@
 """
 __docformat__ = 'restructuredtext'
 
+from zope.app.dublincore.interfaces import IDCDescriptiveProperties
+from zope.app.dublincore.interfaces import IDCTimes
 from zope.app.dublincore.interfaces import IZopeDublinCore
 from zope.app.size.interfaces import ISized
 from zope.app import zapi
 from zope.interface import implements
 from zope.security.interfaces import Unauthorized
 from zope.tales.interfaces import ITALESFunctionNamespace
-from interfaces import IZopeTalesAPI
 
+
 class ZopeTalesAPI(object):
 
-    implements(IZopeTalesAPI, ITALESFunctionNamespace)
+    implements(IDCTimes, IDCDescriptiveProperties, ITALESFunctionNamespace)
 
     def __init__(self, context):
         self.context = context
@@ -77,4 +79,3 @@
         if a is None:
             raise AttributeError, 'created'
         return a.sizeForDisplay()
-



More information about the Zope3-Checkins mailing list