[Zope-Checkins] CVS: Zope/lib/python/Products/ZCatalog - CatalogPathAwareness.py:1.6.16.1 __init__.py:1.17.16.1
Chris McDonough
chrism@zope.com
Fri, 12 Apr 2002 15:11:50 -0400
Update of /cvs-repository/Zope/lib/python/Products/ZCatalog
In directory cvs.zope.org:/tmp/cvs-serv5764
Modified Files:
Tag: Zope-2_5-branch
CatalogPathAwareness.py __init__.py
Log Message:
Register CatalogPathAware (a bare subclass of CatalogPathAwareness
.CatalogAware) as a
ZClass base class. Its reason for existence is to make the name
that shows up in the ZClass Product list different than 'ZCatalog:
CatalogAware', which is the name registered by
CatalogAwareness.CatalogAware. The fix should *really* be to
change the product registry to keep the whole module/class path
and to make the ZClass add UI show the whole path, but this is
nontrivial, we don't want to spend a lot of time on ZClasses, and
this works.
Now when we tell people to use CatalogPathAware instead of CatalogAware,
they will actually be able to do it without a lot of effort.
The reason we can't replace CatalogAware with CatalogPathAware is
backwards-compatibility and the desire to not force people to do
data conversion on their existing instances.
=== Zope/lib/python/Products/ZCatalog/CatalogPathAwareness.py 1.6 => 1.6.16.1 ===
-
-
-
-
-
-
+class CatalogPathAware(CatalogAware):
+ """
+ This is a stub class that gets registered in __init__.py as a
+ ZClass base class. Its reason for existance is to make the name
+ that shows up in the ZClass Product list different than 'ZCatalog:
+ CatalogAware', which is the name registered by
+ CatalogAwareness.CatalogAware. The fix should *really* be to
+ change the product registry to keep the whole module/class path
+ and to make the ZClass add UI show the whole path, but this is
+ nontrivial, we don't want to spend a lot of time on ZClasses, and
+ this works.
+ """
=== Zope/lib/python/Products/ZCatalog/__init__.py 1.17 => 1.17.16.1 ===
"""ZCatalog product"""
-import ZCatalog, Catalog, CatalogAwareness, ZClasses
+import ZCatalog, Catalog, CatalogAwareness, CatalogPathAwareness, ZClasses
from Products.PluginIndexes.TextIndex import Vocabulary
from ZClasses import createZClassForBase
@@ -21,6 +21,8 @@
, 'ZCatalogBase', 'ZCatalog' )
createZClassForBase( CatalogAwareness.CatalogAware, globals()
, 'CatalogAwareBase', 'CatalogAware' )
+createZClassForBase( CatalogPathAwareness.CatalogPathAware, globals()
+ , 'CatalogPathAwareBase', 'CatalogPathAware' )
def initialize(context):
context.registerClass(