예제 #1
0
def create_app():
    app = Flask(__name__,template_folder='../templates',static_folder='../static')
    #
    app.config.from_object(envs.get('develop'))

    init_first_blue(app)
    init_ext(app)

    return app
예제 #2
0
def create_app():
    app = Flask(__name__, template_folder=TEMPLATE_FOLDER)

    init_first_blue(app)

    init_ext(app)

    app.config.from_object(envs.get("develop"))

    return app
예제 #3
0
def create_app():
    app = Flask(__name__)

    app.config.from_object(envs.get("develop"))

    init_first_blue(app)

    init_ext(app)

    return app
예제 #4
0
def create_app(env):
    app = Flask(__name__)

    # 初始化配置
    app.config.from_object(envs.get(env))
    # 初始化蓝图
    init_first_blue(app)

    # 初始化第三方
    init_ext(app)
    return app
예제 #5
0
def create_app():
    app = Flask(__name__, template_folder='../templates')

    # 配置加载
    app.config.from_object(setting.envs.get('develop'))

    # 初始化蓝图
    init_first_blue(app)

    # 初始化各种第三方库
    init_ext(app)
    return app
예제 #6
0
def create_app():
    app = Flask(__name__)
    # 初始化设置  config

    app.config.from_object(envs.get("develop"))
    # 初始化蓝图  views   blue

    init_first_blue(app)
    # 初始化扩展  ext

    init_ext(app)
    return app
예제 #7
0
def create_app():

    # 初始化app
    app = Flask(__name__, template_folder="../templates")

    # 初始化配置文件settings
    app.config.from_object(envs.get('develop'))

    # 初始化蓝图、路由
    init_first_blue(app)

    # 初始化第三方库
    init_ext(app)

    return app
예제 #8
0
def create_app():
    app = Flask(__name__, template_folder=settings.TEMPLATE_FOLDER)
    app.config.from_object(settings.envs.get("develop"))  # 配置加载
    init_first_blue(app)  # 初始化蓝图
    init_ext(app)  # 初始化各种第三方
    return app