예제 #1
0
def create_app():
    app = Flask(__name__)
    app.config.from_object(config.get('develop','default'))
    init_app(app)
    dog_blueprint(app)
    cat_blueprint(app)
    return app
예제 #2
0
def init_flask_app(env):

    app = Flask(__name__)
    # 加载settings配置
    app.config.from_object(config.get(env))
    # print("base_dir:", app.config.items())
    return app
예제 #3
0
def createApp(env=None):

    app = Flask(__name__)

    app.config.from_object(config.get(env or 'default'))

    init_views(app)

    init_ext(app)



    return app
예제 #4
0
def create_app():
    app = Flask(__name__)
    # load configurations
    app.config.from_object(config.get("development", "default"))

    # load extensions
    app_init(app)

    # register blueprints
    register_bp_back(app)
    register_bp_front(app)

    return app
예제 #5
0
def create_app(env_name=None):
    app = Flask(__name__)

    app.config.from_object(config.get("develop"))  #开发环境

    init_ext(app)

    init_blue(app)

    init_blue1(app)

    init_blue2(app)

    return app