[Zope] Another stupid question

Joe Goldthwaite joe at goldthwaites.com
Sat Dec 27 18:19:03 EST 2003


Once again, I'm forced to ask a simple question that everyone probably knows
the answer to but that I can't seem to figure out from any of my multiple
books or online resources.  I need to leave a semi-permanent cookie to store
my options. I'm doing it from within and External Method.  I've tried a
number of things but nothing seems to work.  I'm not sure what the format is
supposed to be. The Zope Book documents the function like as
"setCookie(name, value, **kw)" but doesn't tell me anything about what
"**kw" is.  The Zope Bible looks like it just copied the definition from The
Zope Book.  My other books say nothing on the subject.

I tried this (going from an example I found on a Google search);

   response = REQUEST.RESPONSE
   response.setCookie('ISOptions', 'Value=%s' % Writedict(d), expires='Wed
Feb 2020 14:28:00 GMT')

But it doesn't work.  The cookie is there with the options set correctly but
my cookie manager says that it expires at the end of the session and after
the session ends, the cookie goes away.  Any ideas on what I'm doing wrong?

Thanks.




More information about the Zope mailing list