Ron Bickers wrote:
> On Wed May 24 2006 16:42, Tom Dossis wrote:
>> I haven't been following this thread, however from the error message it
>> appears your adapter is missing the context (adaptee)...
>> def __init__(self, context):
>> # context is the IItem object to be adapted.
> The README says the following:
> "Note that the annotation implementation does not expect any arguments
> to its `__init__`. Otherwise it's basically an adapter."
> And the example is defined as follows:
> class Bar(Persistent):
> def __init__(self):
> self.a = 1
> self.b = 2
> That's why I didn't think the adapter directive would do the right thing, but
> all of this (Zope 3) is pretty new to me, so what do I know.
Mmm, I hadn't seen this before.
>>> from zope.annotation import factory
Did you try something like... ?
And corresponding zcml..
Zope3-users mailing list