from flask import Flask
from flask_bootstrap import Bootstrap
from config import config_options


app = Flask(__name__,instance_relative_config= True)

bootstrap = Bootstrap(app)

def create_app(config_name):
    app = Flask(__name__)
    app.config.from_object(config_options[config_name])
    bootstrap.init_app(app)
    from .main import main as main_blueprint
    app.register_blueprint(main_blueprint)

    return app

from flask import Flask
from flask_bootstrap import Bootstrap
from config import config_options


app = Flask(__name__,instance_relative_config= True)

bootstrap = Bootstrap(app)

def create_app(config_name):
    app = Flask(__name__)
    app.config.from_object(config_options[config_name])
    bootstrap.init_app(app)
    from .main import main as main_blueprint
    app.register_blueprint(main_blueprint)

    return app
