Exemple #1
0
def create_app(name=__name__,
               static_folder="static",
               cfg: config.Config = None):
    cfg = config.Config() if cfg is None else cfg

    app = base.create_app(name, static_folder, cfg)

    return app
Exemple #2
0
def create_app(name=__name__,
               static_folder="static",
               cfg: config.Config = None):
    cfg = config.Config() if cfg is None else cfg

    app = base.create_app(name, static_folder, cfg)

    # Register the app's blueprints
    app.register_blueprint(routes_bp)

    return app
Exemple #3
0
def create_app(name=__name__, cfg: config.Config = None):
    cfg = config.Config() if cfg is None else cfg

    # Properly set the static serving directory
    static_dir = os.path.join(os.path.abspath(os.path.dirname(__file__)),
                              "static")

    app = base.create_app(name, static_dir, cfg)

    log.info("Setting STATIC_DIR to: " + static_dir)
    app.config["STATIC_DIR"] = static_dir

    # Register the app's blueprints
    app.register_blueprint(routes_bp)

    return app