[Zope] create a cookie in python script

J Cameron Cooper jccooper at jcameroncooper.com
Tue Oct 7 19:08:21 EDT 2003


>I am using a ZPT in combination with a pythonscript.
>
>How can I create a cookie in the python script and read the value in the ZPT
>document ?
>
Cookies are a function of the REQUEST object, available in both ZPT 
('context.REQUEST') and scripts (the 'request' built-in). Look it up in 
the API docs and check back if you have any issues.

          --jcc

-- 
"Code generators follow the 80/20 rule. They solve most of the problems, but not all of the problems. There are always features and edge cases that will need hand-coding. Even if code generation could build 100 percent of the application, there will still be an endless supply of boring meetings about feature design."
(http://www.devx.com/java/editorial/15511)





More information about the Zope mailing list