source: products/quintagroup.canonicalpath/tags/0.4/quintagroup/canonicalpath/catalog.py

Last change on this file was 1685, checked in by mylan, 14 years ago

Fix deprication warining in catalog index registration

  • Property svn:eol-style set to native
File size: 402 bytes
Line 
1from zope.interface import Interface
2from zope.component import queryAdapter
3from plone.indexer.decorator import indexer
4
5from interfaces import ICanonicalPath
6
7@indexer(Interface)
8def canonical_path(obj, **kwargs):
9    """Return canonical_path property for the object.
10    """
11    cpath = queryAdapter(obj, interface=ICanonicalPath)
12    if cpath:
13        return cpath.canonical_path()
14    return None
Note: See TracBrowser for help on using the repository browser.