On 24 Feb 2006, at 12:49, Robert (Jamie) Munro wrote:

How can I put something in a session from ZPT?

I've tried:

<div tal:define="session/foo request/foo">
<div tal:define="foo python:session['foo']=request['foo']">

Isn't it
<div tal:define="foo python:request.SESSION.set('foo', request['foo'])">

Doing this kind of logic from ZPT is evil :-(

Do I really have to write a python method just to assign a single value?

Yes, put all you logic in a python script. See Zope 3 views for an event cleaner way :-)



Simplistix - Content Management, Zope & Python Consulting
           - http://www.simplistix.co.uk

Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to