<s> from flask import Flask <EOL> from flask_bootstrap import Bootstrap <EOL> from flask . ext . sqlalchemy import SQLAlchemy <EOL> from config import config <EOL> db = SQLAlchemy ( ) <EOL> def create_app ( config_name ) : <EOL> app = Flask ( __name__ ) <EOL> app . config . from_object ( config [ config_name ] ) <EOL> config [ config_name ] . init_app ( app ) <EOL> Bootstrap ( app ) <EOL> db . init_app ( app ) <EOL> from . auth import auth as auth_blueprint <EOL> app . register_blueprint ( auth_blueprint ) <EOL> from . main import main as main_blueprint <EOL> app . register_blueprint ( main_blueprint ) <EOL> return app </s>
