Hi, I want to use redis to handle my app sessions. I am using the next code
in my model:
from gluon.tools import Auth
from gluon.contrib.redis_utils import RConn
from gluon.contrib.redis_session import RedisSession
gth_dev_db_connection_string = 'postgres://dev_db:dev_db@[ip]/dev_db'
db = DAL(gth_dev_db_connection_string,
lazy_tables=True)
auth = Auth(db)
auth.define_tables(username=False, signature=True)
db._common_fields.append(auth.signature)
# Redis session
rconn = RConn('[ip]', 6379)
sessiondb = RedisSession(redis_conn=rconn, session_expiry=False)
session.connect(request, response, db=sessiondb)
If I comment the last line I am able to login to the application but if I
try to use redis to handle my sessions the application tells me that I am
logged in but the page is stuck in the Log In form. Is this a bug or am I
doing something wrong? Thank you!
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.