
import os,sys
aa=os.path.abspath(__file__)
sys.path.append(os.path.dirname(os.path.dirname(aa)))
from flask import Flask
from blueprints.settings import config,baseConfig,testConfig,qaConfig
from blueprints.selects import indexpage
from blueprints.callback_test import callback_test
from blueprints.tools.rwKeyData import rwKeyData

env=rwKeyData().readKeyData('baseinfo','env') or 'qa'

app1 = Flask(__name__)
app1.register_blueprint(indexpage)
app1.register_blueprint(callback_test)
c=config.get(env,qaConfig)
app1.config.from_object(c)
app1.config.setdefault("sConfig",c)
app1.config.setdefault("baseconfig",baseConfig)



@app1.context_processor
def sis():
    return dict(cc=c)


#if __name__ == '__main__':

sis()
app1.run(debug=True)



