[Zope] Storing things in the session from ZPT

Tino Wildenhain tino at wildenhain.de
Fri Feb 24 08:32:39 EST 2006


Robert (Jamie) Munro schrieb:
> 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']">
> 
> Do I really have to write a python method just to assign a single value?

No you can use the method for all the other work too...
You should avoid application logic in your templates.

You can do that but its ugly.

stop-using-defines-ly
Tino


More information about the Zope mailing list