Exemplo n.º 1
0
def create_app(config=Config):
    app = Flask(__name__)
    app.config.from_object(config)
    db.init_app(app)
    app.register_blueprint(bp_products)
    app.register_blueprint(bp_transaction)
    return app
Exemplo n.º 2
0
def create_app(config=Config):
    app = Flask(__name__)
    # load config
    app.config.from_object(config)

    # load sqlalchemy
    db.init_app(app)

    # register blueprint
    app.register_blueprint(products.bp)
    app.register_blueprint(transactions.bp)

    return app
Exemplo n.º 3
0
def create_app(config=Config):
    app = Flask(__name__, static_url_path='')

    # load config
    app.config.from_object(config)

    # load sqlaclhemy
    db.init_app(app)

    # register bluepritn
    app.register_blueprint(index.bp)
    app.register_blueprint(product.bp)
    app.register_blueprint(transaction.bp)
    app.register_blueprint(login.bp)

    return app
Exemplo n.º 4
0
def create_app(config=Config):
    """Create flask application
    
    :arg config: Flask configuration
    
    :return flask app
    """
    app = Flask(__name__)

    # load configuration
    app.config.from_object(config)

    # load sqlalchemy
    db.init_app(app)

    # register blueprint
    app.register_blueprint(products.bp)
    app.register_blueprint(index.bp)
    app.register_blueprint(transaction.bp)

    return app