On 1/11/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > 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. :-)
That's great! (Makes for a great quote, too. can i use that?) > > 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' I believe you need to set the cookie first cherrypy.response.simpleCookie['userID'] = 2 cherrypy.response.simpleCookie['userID']['expires'] = 0 Kevin

