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

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to webpy@googlegroups.com.
To unsubscribe from this group, send email to 
webpy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/webpy?hl=en.

Reply via email to