> 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  :)

Zope3-dev mailing list
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to