I'm trying to work with cookies, and though they are successfully
being set (I can open my browser settings and see them there with the
correct information), they will not load.
Code for setting:
name = row.name
from web import setcookie
setcookie('name', name)
But when I try to call them back later, via any of the methods on
http://webpy.org/cookbook/cookies, it doesn't find them. I tried just
echoing the result of web.cookies() on the page, and it was an empty
dictionary ("{}"), so it definitely is not finding them, even though I
can see them.
Specific code on the page currently trying to retrieve them:
if status:
message = STATUSES[str(status)]
cookies = cookie(name='test')
if status == 1:
message += cookies.name
In this case, it always displays "Welcome, test" on the page.
What am I missing? I've pored over the api, the examples, and the
source code, as well as the Python documentation on the Cookie module,
and I just don't get what's missing.
Thanks,
Tom
--
You received this message because you are subscribed to the Google Groups
"web.py" 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/webpy?hl=en.