Philipp von Weitershausen wrote:
Rob Campbell wrote:
Ok, that's what I thought. How can I fix the problem?
What problem?
(Yeah, I know, I could read your original post now but I think you'll be
able to figure it out by youself now. You'll just have to work with the
fact that contains() adds a __setitem__ declaration to your interface.)
The problem is that I am getting the following error when starting zope.
zope.configuration.config.ConfigurationConflictError: Conflicting
configuration
actions
For: ('protectName', <class 'rats.foster.FosterRecord'>, '__setitem__')
In zcml I have require subdirectives for FosterRecord. They set
permissions for
zope.app.container.interfaces.IReadContainer/IWriteContainer and
IFosterRecord, along with set_schema for IFosterRecord.
I started getting the errors when I added IReadContainer and
IWriteContainer.
Is the problem coming from contains() and a schema being in the same
interface? Or am I doing something wrong in the zcml? I'm very new to
zope, and this is my first attempt at using it. I have your book, and
I'm looking forward to the new edition.
I think I can create an IFosterSourceContainer interface and have the
constraint there. Then I would have to implement that interface for
FosterRecord. Would that work? Also, is there any other/better way to
do it?
*Usually* we only deal with contains() within IContainer-derived
interfaces anyway. That doesn't mean you have to go and implement
IContainer now.
--
Rob Campbell
_______________________________________________
Zope3-users mailing list
[email protected]
http://mail.zope.org/mailman/listinfo/zope3-users