[Zope3-Users] ForbiddenAttribute: ('append',
[]) using append on PersistentList
Achim Domma
domma at procoders.net
Sat Jun 17 05:30:30 EDT 2006
Hi,
I have implemented a view for a catalog index. The page template
contains this little form to add strings to a list of categories:
<form action="@@add_category" method="post">
<input type="text" name="name">
<input type="submit">
</form>
The view class looks like this:
class EditView(object):
def categories(self):
return self.context.categories
def add_category(self,name):
self.context.categories.append(name)
Together they are registered as:
<browser:page
name="categories.html"
title="Categories"
menu="zmi_views"
permission="zope.ManageServices"
for="proCoders.interfaces.ICategoryIndex"
class=".CategoryIndex.EditView"
template="CategoryIndex.pt"
/>
<browser:page
for="proCoders.interfaces.ICategoryIndex"
name="add_category"
class=".CategoryIndex.EditView"
attribute="add_category"
permission="zope.ManageServices"/>
If I submit the form, add_category is called, but I get the following error:
ForbiddenAttribute: ('append', [])
Any hint what I'm doing wrong?
regards,
Achim
More information about the Zope3-users
mailing list