Changeset 1685 in products


Ignore:
Timestamp:
Feb 10, 2010 12:21:38 PM (15 years ago)
Author:
mylan
Message:

Fix deprication warining in catalog index registration

Location:
quintagroup.canonicalpath/trunk/quintagroup/canonicalpath
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.canonicalpath/trunk/quintagroup/canonicalpath/catalog.py

    r782 r1685  
     1from zope.interface import Interface 
    12from zope.component import queryAdapter 
    2 from Products.CMFPlone.CatalogTool import registerIndexableAttribute 
     3from plone.indexer.decorator import indexer 
    34 
    45from interfaces import ICanonicalPath 
    56 
    6  
    7 def canonical_path(obj, portal, **kwargs): 
     7@indexer(Interface) 
     8def canonical_path(obj, **kwargs): 
    89    """Return canonical_path property for the object. 
    910    """ 
     
    1213        return cpath.canonical_path() 
    1314    return None 
    14  
    15 registerIndexableAttribute('canonical_path', canonical_path) 
  • quintagroup.canonicalpath/trunk/quintagroup/canonicalpath/configure.zcml

    r782 r1685  
    77  <include package="archetypes.schemaextender" /> 
    88 
    9   <adapter 
    10         factory=".adapters.canonicalPathAdapter" 
    11         /> 
     9  <adapter factory=".adapters.canonicalPathAdapter" /> 
     10 
     11  <adapter name="canonical_path" factory=".catalog.canonical_path" /> 
    1212 
    1313  <genericsetup:registerProfile 
Note: See TracChangeset for help on using the changeset viewer.