当前位置: 首页>>代码示例>>Python>>正文


Python SessionManager.delete方法代码示例

本文整理汇总了Python中pycket.session.SessionManager.delete方法的典型用法代码示例。如果您正苦于以下问题:Python SessionManager.delete方法的具体用法?Python SessionManager.delete怎么用?Python SessionManager.delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pycket.session.SessionManager的用法示例。


在下文中一共展示了SessionManager.delete方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: deletes_multiple_session_objects_at_once

# 需要导入模块: from pycket.session import SessionManager [as 别名]
# 或者: from pycket.session.SessionManager import delete [as 别名]
    def deletes_multiple_session_objects_at_once(self):
        handler = StubHandler()
        manager = SessionManager(handler)

        manager.set('some-object', {'foo': 'bar'})
        manager.set('some-object2', {'foo2': 'bar2'})
        manager.delete('some-object', 'some-object2')

        raw_session = self.client.get(handler.session_id)
        session = pickle.loads(raw_session)

        self.assertEqual(list(session.keys()), [])
开发者ID:Mondego,项目名称:pyreco,代码行数:14,代码来源:allPythonContent.py

示例2: deletes_objects_from_session

# 需要导入模块: from pycket.session import SessionManager [as 别名]
# 或者: from pycket.session.SessionManager import delete [as 别名]
    def deletes_objects_from_session(self):
        handler = StubHandler()
        manager = SessionManager(handler)

        manager.set('some-object', {'foo': 'bar'})
        manager.set('some-object2', {'foo2': 'bar2'})
        manager.delete('some-object')

        raw_session = self.client.get(handler.session_id)
        session = pickle.loads(raw_session)

        self.assertEqual(session.keys(), ['some-object2'])
开发者ID:daqing15,项目名称:pycket,代码行数:14,代码来源:test_session.py

示例3: post

# 需要导入模块: from pycket.session import SessionManager [as 别名]
# 或者: from pycket.session.SessionManager import delete [as 别名]
 def post(self):
     session=SessionManager(self)
     session.delete(self)
     self.redirect("http://lyket.com/")
开发者ID:MathematicianVogt,项目名称:lyk,代码行数:6,代码来源:server.py

示例4: get

# 需要导入模块: from pycket.session import SessionManager [as 别名]
# 或者: from pycket.session.SessionManager import delete [as 别名]
 def get(self):
     session = SessionManager(self)
     session.delete('authenticated')
     sessionid = self.get_current_session()
     self.Disconnect(sessionid)
     self.redirect("/auth/login")
开发者ID:ytjohn,项目名称:rondurev,代码行数:8,代码来源:views.py

示例5: delete

# 需要导入模块: from pycket.session import SessionManager [as 别名]
# 或者: from pycket.session.SessionManager import delete [as 别名]
 def delete(cls, handler, name):
     session = SessionManager(handler)
     session.delete(name)
开发者ID:ehsansh84,项目名称:Customs,代码行数:5,代码来源:session2.py


注:本文中的pycket.session.SessionManager.delete方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。