开发者

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜