[Zope3-Users] session id

TAHARA Yusei yusei at domen.cx
Mon Jan 2 07:17:30 EST 2006


Hello.

At Mon, 2 Jan 2006 21:48:11 +1100,
Simon Hang wrote:
> 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?

How about make a tales namespace for session api?

Regards,

-- 
Tahara Yusei
yusei at domen.cx


More information about the Zope3-users mailing list