#NEWLINE# def create_app( config_name ) : #NEWLINE# #INDENT# app = Flask ( __name__ ) #NEWLINE# app . config . from_object ( config [ config_name ] ) #NEWLINE# config [ config_name ] . init_app ( app ) #NEWLINE# bootstrap . init_app ( app ) #NEWLINE# mail . init_app ( app ) #NEWLINE# moment . init_app ( app ) #NEWLINE# db . init_app ( app ) #NEWLINE# login_manager . init_app ( app ) #NEWLINE# pagedown . init_app ( app ) #NEWLINE# if ( ( not app . debug ) and ( not config_name . testing ) and ( not app . config [ 'SSL_DISABLE' ] ) ) : #NEWLINE# #INDENT# from flask.ext.sslify import SSLify #NEWLINE# sslify = SSLify ( app ) #NEWLINE# #UNINDENT# from . main import main as main_blueprint #NEWLINE# app . register_blueprint ( main_blueprint ) #NEWLINE# from . auth import auth as auth_blueprint #NEWLINE# app . register_blueprint ( auth_blueprint , url_prefix = '/auth' ) #NEWLINE# from . api_1_0 import api as api_1_0_blueprint #NEWLINE# app . register_blueprint ( api_1_0_blueprint , url_prefix = '/api/v1.0' ) #NEWLINE# return app