[Zope] Delete value from REQUEST
Ashley
ashleylloyd at hotmail.com
Thu Jan 22 06:03:24 EST 2004
Sorry if this is a really stupid question, but either way I'd realy
appreciate some help!
I have a problem deleting a value "theClient" from REQUEST.
The value is set initially using:
<dtml-call expr="RESPONSE.setCookie('theClient',whatever_value)">
I found some time ago this little external method posted by Daryl Tester:
===========================================================
def removeRequest(REQUEST, item):
"Remove an item from a REQUEST.form"
try:
del REQUEST.form[item]
except:
pass
return None
===========================================================
This obviously did not work straight away for this particular item, since it
was in the cookies section of REQUEST, so I changed it to del
REQUEST.cookies[item]. (Please bear with any ignorance I may have displayed
here).
This initially appears to work fine. I call the external method from within
a page, and then view REQUEST while still on the same page, and theClient
has disappeared. However, if I subsequently go to any other page it is still
there.
I have tried RESPONSE.expireCookie(item) in the external method, and Zope
didn't seem to appreciate that!
What am I doing wrong?
TIA
Ashley
More information about the Zope
mailing list