runtimeenvironmentprovider.py 文件源码

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

项目:edmunds 作者: LowieHuyghe 项目源码 文件源码
def register(self):
        """
        Register the service provider
        """

        config_debug = self.app.config('app.debug', None)

        # Correct the debug mode
        if 'FLASK_DEBUG' not in os.environ:
            if config_debug is not None:
                self.app.debug = config_debug
            elif self.app.is_development():
                self.app.debug = True

        # Debug Application for Google App Engine as this is not loaded by default
        if self.app.debug and self.app.is_gae():
            self.app.wsgi_app = DebuggedApplication(self.app.wsgi_app)

        # Testing environment
        if self.app.is_testing():
            self.app.testing = True
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号