Closed tdesvenain closed 4 years ago
working on this in https://github.com/collective/collective.contact.core/tree/plone5-only
Degroking is almost done but I can't get the adapters to work correctly...
Can someone enlighten me about the interface dependencies in https://github.com/collective/collective.contact.core/blob/plone5-only/src/collective/contact/core/adapters.py ?
What I've tried so far...
<adapter
for="*"
provides="collective.contact.core.interfaces.IVCard"
factory=".adapters.ContactDetailsVCard"
/>
<adapter
for="collective.contact.core.content.held_position.HeldPosition"
provides="collective.contact.core.interfaces.IVCard"
factory=".adapters.HeldPositionVCard"
/>
<adapter
for="collective.contact.core.content.organization.Organization"
provides="collective.contact.core.interfaces.IVCard"
factory=".adapters.OrganizationVCard"
/>
and
class ContactDetailsVCard(ContactableVCard):
def __init__(self, context):
self.context = context
...
@implementer(IHeldPosition)
class HeldPositionVCard(ContactableVCard):
def __init__(self, context):
self.context = context
...
@implementer(IOrganization)
class OrganizationVCard(ContactableVCard):
def __init__(self, context):
self.context = context
...
ping @sgeulette @gbastien @boulch @tdesvenain
I think I adapters are working now, was misled by https://github.com/collective/collective.contact.core/issues/67
all grok removed in https://github.com/collective/collective.contact.core/tree/plone5-only
cc @agitator