Shannon Cruey
unread,Jul 20, 2012, 2:37:21 PM7/20/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to we...@googlegroups.com
Hey everyone, I spent about an hour on this so here it is if anyone ever gets stuck like I did.
I turned up my second web.py app today, and noticed I wasn't able to log in to both sites from the same browser. You guessed it - session cookie conflicts.
After digging in I discovered by default the cookie_name for any web.py app is hardcoded. I didn't find anything in the docs about how to change it, so I dug in to the code. Here's the answer that worked for me...
app = web.application(urls, globals(), autoreload=True)
web.config.session_parameters["cookie_name"] = "my_app_name"
session = web.session.Session(app, web.session.ShelfStore(shelve.open('session.shelf')))
This would be a perfect entry for the web.py wiki! Coming soon???? :-P
S