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.