[Zope3-Users] session id

Simon Hang hangzhiyun at gmail.com
Mon Jan 2 05:48:11 EST 2006


Dear all,

How can I use zope session id(client_id) in .pt template? I'm not
understanding zope's session id management very well.
Sometime, I can get session id using code like this

<span tal:content="python:request.cookies.items()[0][1]"/>

But strange think is sometimes request object has empty cookie. above code
will generate errors.

I know I can get session id using a function like below:
...
    def SessionData(self):
        return ISession(self.request).client_id
...

but is it possible to do this ONLY using a .pt file?

Thanks in advance,
Simon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope3-users/attachments/20060102/bdf4f6f0/attachment.htm


More information about the Zope3-users mailing list