def create_app(): app = Flask(__name__) app.debug = True init_filter(app) init_blue(app) init_ext(app) return app
def create_app(): app = Flask(__name__) app.config['SECRET_KEY'] = '123456789' app.debug = True init_api(app) init_ext(app) return app
def create_app(env_name): app = Flask(__name__) # 从对象中加载默认的配置文件 app.config.from_object(environment.get(env_name)) init_api(app) init_ext(app) return app
def create_app(): # 项目的配置文件 app.config.from_object(DevConfig()) # 路由初始化 init_api(app) # 第三方插件初始化 init_ext(app) return app
def create_app(): app = Flask(__name__) # 上线是删除 或者改为Flase app.debug = True # 自定义选择器需要在蓝图之前注册 register_blueprint(app) init_ext(app) return app
def create_app(): app = Flask(__name__) app.debug = True # 注意产品上线的时候要管了 init_api(app) init_ext(app) # 拓展程序 return app
def create_app(): #注册蓝图 register_blue(app) init_ext(app) ''' 参数 参数一 蓝图实例化对象 参数二 注册 ''' return app
def create_app(): app = Flask(__name__) # 配置密钥 app.config['SECRET_KEY'] = '123456' app.debug = True # 注册蓝图 register(app) # 初始化数据库相关配置 init_ext(app) return app
def create_app(env_name): app = Flask(__name__) app.config.from_object(env.get(env_name)) init_ext(app) init_api(app) return app
def create_app(): app = Flask(__name__) app.debug = True init_api(app) init_ext(app) return app
def create_app(): init_api(app) init_ext(app) return app