Fred C schrieb:
>
> Right after authentication I set up few cookies and I want these
> cookies to be persistant. But after identity.current.logout() is
> called all my cookies are deleted. I can't figure out why logout is
> removing my cookies.
Maybe their lifetime isn't specified long enough, or only to last for
that browser session?
This works for me:
cookies = cherrypy.response.simple_cookie
comment_vals = []
for key, value in cd.items():
if value is not None:
comment_vals.append("%s:%s" % (key,
base64.encodestring(unicode(value).encode('utf-8').strip())))
cookies[USER_COOKIE] = '#'.join(comment_vals)
cookies[USER_COOKIE]['path'] = '/'
cookies[USER_COOKIE]['expires'] = 'December 31, 2020'
Diez
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---