开发者

sessions with twisted.web

开发者 https://www.devze.com 2023-02-09 11:19 出处:网络
I want to store a instance of ldap connection in a session var. I use request.getSession() but don\'t work correctly. My code:

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)
0

精彩评论

暂无评论...
验证码 换一张
取 消