Hi all,

Just like to say a huge thanks to the developers for such an...
empowering package; I'm rather a newbie when it comes to web stuff, but
I'm building things in TG that should be beyond me. :-)

I've hit issues with using cookies as per
http://turbogears.com/docs/cookies.html.

I can set a cookie with
cherrypy.response.simpleCookie['userID'] = 1
and change it with
cherrypy.response.simpleCookie['userID'] = 2
and retrieve it with
cherrypy.request.simpleCookie['userID']['value']

However, using
cherrypy.response.simpleCookie['userID']['expires'] = 0 to remove it
gives me -

cherrypy.response.simpleCookie['userID']['expires'] = 0
KeyError: 'userID'

Am I making a basic error somewhere? This is all running from
localhost, and I can confirm that the cookie is still there, in fact
wrapping the call in a try/except & retrieving the cookie value on
KeyError works fine and dandy...

I have a feeling that the VisitorFilter I've been reading about on this
list will supercede this, but that nagging feeling that I've made a
simple error is still with me. 

Regards, 

Liam Clarke

Reply via email to