sessions.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:RealtimePythonChat 作者: quangtqag 项目源码 文件源码
def __init__(self, path=None, filename_template='werkzeug_%s.sess',
                 session_class=None, renew_missing=False, mode=0o644):
        SessionStore.__init__(self, session_class)
        if path is None:
            path = tempfile.gettempdir()
        self.path = path
        if isinstance(filename_template, text_type) and PY2:
            filename_template = filename_template.encode(
                get_filesystem_encoding())
        assert not filename_template.endswith(_fs_transaction_suffix), \
            'filename templates may not end with %s' % _fs_transaction_suffix
        self.filename_template = filename_template
        self.renew_missing = renew_missing
        self.mode = mode
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号