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 | |
---|
1 | from zope.interface import Interface |
---|
2 | from zope.component import queryAdapter |
---|
3 | from plone.indexer.decorator import indexer |
---|
4 | |
---|
5 | from interfaces import ICanonicalPath |
---|
6 | |
---|
7 | @indexer(Interface) |
---|
8 | def 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.