<s> import ConfigParser <EOL> import os <EOL> from flask import Flask <EOL> from flask . ext . sqlalchemy import SQLAlchemy <EOL> db = SQLAlchemy ( ) <EOL> config = ConfigParser . SafeConfigParser ( ) <EOL> config . add_section ( '<STR_LIT>' ) <EOL> config . set ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) <EOL> config . set ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) <EOL> config . set ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) <EOL> config . set ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) <EOL> config . read ( '<STR_LIT>' ) <EOL> DB_URI = os . path . expanduser ( config . get ( '<STR_LIT>' , '<STR_LIT>' ) ) <EOL> BASE_URL = os . path . expanduser ( config . get ( '<STR_LIT>' , '<STR_LIT>' ) ) <EOL> DATA_DIR = os . path . expanduser ( config . get ( '<STR_LIT>' , '<STR_LIT>' ) ) <EOL> INITDATA_DIR = os . path . expanduser ( config . get ( '<STR_LIT>' , '<STR_LIT>' ) ) <EOL> def create_app ( ) : <EOL> """<STR_LIT>""" <EOL> app = Flask ( __name__ ) <EOL> app . debug = True <EOL> app . config [ '<STR_LIT>' ] = DB_URI <EOL> db . init_app ( app ) <EOL> from login import bp as bp_login <EOL> app . register_blueprint ( bp_login ) <EOL> from admin import bp as bp_admin <EOL> app . register_blueprint ( bp_admin , url_prefix = '<STR_LIT>' ) <EOL> return app </s>
