[Grok-dev] global_adapter method no longer gets adapts from factory annotation.

Jan-Carel Brand lists at opkode.com
Tue Mar 20 10:37:54 UTC 2012


On Tue, 2012-03-20 at 09:17 +0100, Jan-Wijbrand Kolman wrote:
> On 3/15/12 13:40 , Jan-Carel Brand wrote:
> > The two clashing adapters are two validators that I am registering via
> > grok.global_adapter. See here: http://pastie.org/3600499
> 
> Maybe I didn't look correctly, but where in this pastie do the two
> components (UniquenessValidator and ProcurementExplanationValidator)
> define what they are supposed to adapt? Would that be in the
> SimpleFieldValidator baseclass?

Yes, that's in the SimpleFieldValidator base class:

> class SimpleFieldValidator(object):
>     """Simple Field Validator"""
>     zope.interface.implements(interfaces.IValidator)
>     zope.component.adapts(
>         zope.interface.Interface,
>         zope.interface.Interface,
>         zope.interface.Interface,
>         zope.schema.interfaces.IField,
>         zope.interface.Interface)




More information about the Grok-dev mailing list