[Zope3-dev] IFolder and IAdding

Tim Terlegård tim at se.linux.org
Sat Oct 21 12:50:47 EDT 2006


> I want to use a formlib add form and I have a view called addEvent:
> 
>   <browser:page
>       for="zope.app.folder.interfaces.IFolder"
>       name="addEvent"
>       class=".eventforms.EventAddForm"
>       permission="zope.ManageContent"
>       />

I changed the class argument to be a new class called AddEvent:

from zope.app.container.browser.adding import Adding

class EventAddForm(AddForm): ...

class AddEvent:
    def __init(self, context, request):
        self.context = context
	self.request = request

    def __call__(self):
        adding = Adding(self.context, self.request)
        return EventAddForm(adding, self.request)()

This actually worked, but I don't think I'm very fond of the solution. I
still have all those questions I had in the previous mail  :)

Tim


More information about the Zope3-dev mailing list