<s> import os <EOL> from flask import Flask <EOL> from flask . ext . bootstrap import Bootstrap <EOL> from flask . ext . sqlalchemy import SQLAlchemy <EOL> from flask . ext . login import LoginManager <EOL> bootstrap = Bootstrap ( ) <EOL> db = SQLAlchemy ( ) <EOL> lm = LoginManager ( ) <EOL> lm . login_view = '<STR_LIT>' <EOL> def create_app ( config_name ) : <EOL> """<STR_LIT>""" <EOL> app = Flask ( __name__ ) <EOL> cfg = os . path . join ( os . getcwd ( ) , '<STR_LIT>' , config_name + '<STR_LIT>' ) <EOL> app . config . from_pyfile ( cfg ) <EOL> bootstrap . init_app ( app ) <EOL> db . init_app ( app ) <EOL> lm . init_app ( app ) <EOL> from . main import main as main_blueprint <EOL> app . register_blueprint ( main_blueprint ) <EOL> return app </s>
