[Zope-CVS] CVS: Products/Basket - utils.py:1.24

Chris McDonough chrism at plope.com
Thu Nov 10 16:48:38 EST 2005


Update of /cvs-repository/Products/Basket
In directory cvs.zope.org:/tmp/cvs-serv9553

Modified Files:
	utils.py 
Log Message:
Add registerZClass method to EggProductContext.


=== Products/Basket/utils.py 1.23 => 1.24 ===
--- Products/Basket/utils.py:1.23	Wed Nov  9 19:40:46 2005
+++ Products/Basket/utils.py	Thu Nov 10 16:48:08 2005
@@ -336,6 +336,24 @@
             fd = package.__FactoryDispatcher__ = __FactoryDispatcher__
         return fd
 
+    def registerZClass(self, Z, meta_type=None):
+        """ Deprecated """
+        base_class = Z._zclass_
+        module = base_class.__module__
+        name = base_class.__name__
+
+        key = "%s/%s" % (module, name)
+
+        if module.startswith('Products.'):
+            module = module.split('.')[1]
+        else:
+            module = module.split('.')[0]
+
+        info = "%s: %s" % (module, name)
+
+        Products.meta_class_info[key] = info
+        Products.meta_classes[key] = Z
+
     def registerBaseClass(self, base_class, meta_type=None):
         #
         #   Convenience method, now deprecated -- clients should



More information about the Zope-CVS mailing list