[Zope3-Users] problems with contains and containers

Lorenzo Gil Sanchez lgs at sicem.biz
Thu Mar 23 12:30:15 EST 2006


Hi Katsutoshi,

your explanations make things much clearer. Thanks a lot for sharing
them with us!

Lorenzo

El jue, 23-03-2006 a las 17:30 +0900, wata at kke.biglobe.ne.jp escribió:
> Hi, Lorenzo.
> 
> Today, I suffered the same problem as you met.
> 
> This is what I figured out.
> 
> ----
> 'containers' function add '__parent__' attribute to IMyContent
> interface, like you did to IMyContentContained interface.
> 
> It means that new implementation of IMyContent has '__parent__',
> while old implementation didn't. the difference causes the error.
> Now, addform will try to render '__parent__', because IMyContent
> has it. however, the view of '__parent__' is never found. then
> the error raised.
> ----
> 
> If you want to omit '__parent__', you have to specify that 
> using 'fields' attribute of 'addform' directive in your zcml,
> or old implementation might be better.
> 
> I think that this situation lessen the value of
> 'contains'/'containers' functions. I wonder if I understand
> things correctly. it might be some other way.
> 
> 
> Regards,
> Katsutoshi
> --
> Watanabe, Katsutoshi
> 
> _______________________________________________
> Zope3-users mailing list
> Zope3-users at zope.org
> http://mail.zope.org/mailman/listinfo/zope3-users
> 



More information about the Zope3-users mailing list