def create_app(config=None): import config as config_mod app.config.from_object(getattr(config_mod, config)) global SQLALCHEMY_DATABASE_URI, SQLALCHEMY_MIGRATE_REPO SQLALCHEMY_DATABASE_URI = app.config['SQLALCHEMY_DATABASE_URI'] SQLALCHEMY_MIGRATE_REPO = app.config['SQLALCHEMY_MIGRATE_REPO'] from wpcgi.setup import setup setup(app) return app
#!/data/project/nullzerobot/python/bin/python import site site.addsitedir("/data/project/nullzerobot/python/lib/python2.7/site-packages") from wpcgi import app from config import TestProductionConfig as Config app.config.from_object(Config) from wpcgi.setup import setup setup(app) #from app2 import app from wsgiref.handlers import CGIHandler CGIHandler().run(app)