[Zope3-Users] ForbiddenAttribute: ('append', []) using append on PersistentList

Achim Domma domma at procoders.net
Sat Jun 17 10:26:51 EDT 2006


Achim Domma wrote:

> I have implemented a view for a catalog index. The page template 
> contains this little form to add strings to a list of categories:
[...]
> class EditView(object):
>     def categories(self):
>         return self.context.categories
> 
>     def add_category(self,name):
>         self.context.categories.append(name)
[...]
> If I submit the form, add_category is called, but I get the following 
> error:
> 
> ForbiddenAttribute: ('append', [])

To answer my own question: It works if I don't manipulate the list in 
the view, which is bad anyway. If I add a addCategory to the content 
object and use this method in the view, it's ok.

regards,
Achim


More information about the Zope3-users mailing list