[Zope3-Users] Re: EditForm fails in SiteManager because of containment constraint

Jürgen Kartnaller juergen at kartnaller.at
Sat Apr 7 12:32:38 EDT 2007


Christophe Combelles wrote:
> Hello,
> 
> I have a regular content object which uses the formlib for its edit view.
> Nothing special, just like a Recipe.
> But I want this object to only reside in the Site Manager, because it 
> will be used as a configurable local utility (some kind of 
> LocalKitchenTools utility)
> 
> Everything is perfect, and the EditForm works well until I want to tell 
> this object to be only contained in the SiteManager. So I just add this 
> statement in the interface:
> 
> containers(ILocalSiteManager)
> or
> containers(ISiteManagementFolder)

'container' adds __parent__ as schema.Field attribute to your interface.
You need to omit __parent__ in your formlib form_fields definition.

Jürgen



More information about the Zope3-users mailing list