[Zope3-Users] __setitem__ works, __delitem__ fails on custom site

Roy Mathew roymathew at bellsouth.net
Sun Jan 21 19:06:36 EST 2007


Hi Folks,

I am trying to create a custom Site object, using the below
declarations; all goes well when addding an object O1 to the QSite,
but when trying to delete object O1, I get:

  ForbiddenAttribute: ('__delitem__', <...QSite object at 0xa61dcd6c>)

The code:

  class IQSite(IPossibleSite):
    "custom site"
  
  class QSite(Folder, site.SiteManagerContainer):
    implements(IQSite)
    ...
  
  <class class=".qtmodule.QSite">
     <require permission="zope.View"
        interface="zope.app.container.interfaces.IReadContainer" />
     <require permission="zope.ManageContent"
        set_schema="zope.app.container.interfaces.IWriteContainer" />

     <require permission="zope.Public" interface=".interfaces.IQSite" />
     <require permission="zope.ManageContent" set_schema=".interfaces.IQSite" />
  </class>

Since both __setitem__ and __getitem__ belong to the same interface,
I am baffled - what gives?

-- 
Thanks,
Roy Mathew.


More information about the Zope3-users mailing list