sessions with twisted.web
I want to store a instance of ldap connection in a session var. I use request.getSession() but don't work correctly. My code:
session = request.getSession()
connect = LdapConnection(request.args['host'][0],'cn='+request.args['user'][0]+',ou=People,dc=Company',request.args['password'][0])
session.addComponent(LdapConnection,connect)
When I need the instance of ldapconnection, I want to recover but don't work :(
conect = sessi开发者_StackOverflow中文版on.getComponent(LdapConnection)
精彩评论