Hi. It worked. interesting. I appreciate, TAHARA.

> from zope.app.session.interfaces import ISession
>
> PACKAGE_NAME = 'your application name'
>
> class MessageEditView:
>
>     def __init__(self, context, request):
>
>         session = ISession(request)[PACKAGE_NAME]
>
>         password = request.get('password')
>         if password is None:
>             password = session.get('password')
>
>         message = getMessage(context, password) # please implement this:)
>
>         session['password'] = password
>
>         self.context = message # trick1
>         self.request = request
>         self._setUpWidgets()
>
> <editform
>     label="Edit Message"
>     name="edit.html"
>     for="IMessageBoard"
>     schema="IMessage"  <------ trick2
>     class="MessageEditView"
>     permission="zope.ManageContent"
>     menu="zmi_views"
>     title="Edit Message"
>     />
> """
>


_______________________________________________
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users

Reply via email to