Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Helpful session tip
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Shannon Cruey  
View profile  
 More options Jul 20 2012, 2:37 pm
From: Shannon Cruey <shannon.cr...@cloudsidekick.com>
Date: Fri, 20 Jul 2012 14:37:21 -0400
Local: Fri, Jul 20 2012 2:37 pm
Subject: Helpful session tip

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 must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic