Sounds like it keeps creating new sessions. Is the session cookie coming 
back with each request?

On Monday, August 22, 2011 9:45:32 AM UTC-4, guruyaya wrote:

> I'd just like to add, that I looked into the session table, and it 
> seem to create a new entry for every click I have in the website, when 
> I'm using postgres, while in sqlite, no new entry created. 
>
> On Aug 22, 4:26 pm, guruyaya <guru...@gmail.com> wrote: 
> > Cosider this code for an app named test: 
> > Model: db.py 
> > 
> > db = DAL('postgres://user:****@localhost/mydb')  # Replace with db = 
> > DAL('sqlite://mydb.sqlite')   to see it working well 
> > 
> > from gluon.tools import Mail, Auth, Crud, Service, PluginManager, 
> > prettydate 
> > db.define_table('test', Field('title')) 
> > session.connect(request, response, masterapp='test', db=db) 
> > 
> > controller: default.py 
> > def index(): 
> >         if 'test' in session: 
> >                 show = session.test 
> >         session.test = 'yaya' 
> >         return locals() 
> > 
> > I expected to go to /test/default/index, see nothing on the first 
> > click, and after a refreash see that the show varible contain yaya the 
> > words yaya. It doesn't. It shows nothing, no matter how many times I 
> > refrash the page. 
> > 
> > Please note that this problem occures only when I'm using postgres to 
> > keep the session. I've tested a similar code using both sqlite and 
> > mysql, and all worked as expected. It did happen in more then one 
> > database, using more then one app name (so it's not a brocken table). 
> > 
> > This code was tested on trunk version of web2py (my mysql test was 
> > coducted on the version installed on fluxflex). I tested it using 
> > postgres 9.0 
> > Your help appriciated.

Reply via email to