def create_app(config=None):
app = Flask(__name__)
app.config.update(config)
app.wsgi_app = SessionMiddleware(app.wsgi_app, config['session'])
app.register_blueprint(bp)
if config.get('logger'):
logging.config.dictConfig(config.get('logger'))
_configure_error_handlers(app)
_setup_requests(app)
return app
评论列表
文章目录