database.py 文件源码

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

项目:globus-sample-data-portal 作者: globus 项目源码 文件源码
def __init__(self, app):
        """Constructor."""
        self.app = app

        @app.teardown_appcontext
        def close_connection(exception):
            """Close database connection when finished handling request."""
            db = getattr(g, '_database', None)

            if db is not None:
                db.close()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号