On Fri, 2011-06-24 at 13:50 +0200, Christian Klinger wrote:
> So if you create in your add form something like this:
> class MYAddForm(AddForm):
>      def create(self, data):
>           return MyObject(data)
> the catalog stuff is done for you. 

If I override just the 'create' method I get the ForbiddenAttribute for
'add' operation on self.context.add(object) in
zope.formlib.form.AddFormBase.add method. 

Here the 'self.context' is a BTreeContainer whose interface is derived
from IContainer and the ZCML config for that class is marked as 

        <class class="..."
If I add the zcml config for that class to allow attribute like this

                <allow attributes="add" />

I get AttributeError stating that the object has no attribute 'add'

How do I fix this?

Joshua Immanuel
HiPro IT Solutions Private Limited

Attachment: signature.asc
Description: This is a digitally signed message part

Zope-Dev maillist  -  Zope-Dev@zope.org
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope )

Reply via email to