|
From: Alec M. <ap...@co...> - 2014-10-23 14:27:44
|
I don't think this is a bug per se, nor is it likely easily fixable. Note
that actual adapter registration is done in zcml, the decorator simply
wraps the function and add a _default_ context interface for the adapter.
To get adapters registered for different interfaces you will always need to
perform multiple zcml (or grok) registrations, performing multiple function
wrappings is neither useful nor necessary for this purpose. You should be
able to simplify a bit though:
in python:
@indexer(IATDocument)
def country_indexer(context):
return _country_indexer(context)
in zcml:
<adapter name="getCountry" factory=".extender.country_indexer" />
<adapter name="getCountry" factory=".extender.country_indexer"
for="Products.ATContentType.interfaces. IATFile" />
…
On Wed, Oct 22, 2014 at 7:00 PM, Jean Jordaan <jea...@gm...>
wrote:
> On Thu, Oct 23, 2014 at 5:45 AM, Jens W. Klein <je...@bl...>
> wrote:
> >
> > i'd consider that as conceptional a bug with the decorator.
>
> OK, logged here, while I see if I can figure it out:
> https://dev.plone.org/ticket/20054
>
> (Is that still the place to log Plone bugs? There's no tracker on
> https://github.com/plone/plone.indexer )
>
> --
> jean . .. .... //\\\oo///\\
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Plone-developers mailing list
> Plo...@li...
> https://lists.sourceforge.net/lists/listinfo/plone-developers
>
|