I got another trouble. I succeeded to show edit.html, but I could not
edit actaully.
edit.html is an editview page. So, the html has post tag like
post action=http://.../messageboardobject/edit.html;
Therefore, same traverser trys to receive this posted action, and trys
to check password again
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 =
Hi.
class MessageTraverser:
implements(IPublishTraverse)
__used_for__ = IMessage
def publishTraverse(self, request, name):
if name == 'edit.html':
# verify password and return a message or raise NotFoundError.
How do I pass POSTed value to publishTraverse's
Hi.
At this post method, do I redirect to a URL like
./edit.html?field.passwd=KDJFKJA ? It is not cool. Are there any ways?
Why you don't post to edit.html from password.html?
Yes, it worked. It seems I was being confused.
zapi.queryView has been deprecated. You should use
Sorry, this code did not make sense. This code trys to traverse
'messageboardobject/messageobject/edit.html' also. I could access
directly. I tried to reject only this by replacing else: to
elif string.find(name, 'editmine.html') == -1:
But, name value receives only 'messageobject' in this
Hi.
I made a traverser for Message objects also, and I prohibited access to
editview.html at there. It worked.
Thank you, TAHARA.
from zope.publisher.interfaces import NotFound
from zope.app import zapi
from zope.app.container.traversal import ContainerTraverser
from
Hi. I have one more question.
Imagine there are a MessageBoard and many Message objects.
I would like to allow users to modify only his message as common message
board if user type a password for the message.
I made a view to show forms to be typed password, and I processed POSTed
values, and I