def create_app(self): '''Start the wsgi application''' a = app.create_app({ 'SQLALCHEMY_BINDS' : { 'orcid': 'sqlite:///' } }) db.create_all(app=a) return a
def get_app_config(key): opath = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) if opath not in sys.path: sys.path.insert(0, opath) from orcid_service import app as application app = application.create_app() with app.app_context() as c: print('Getting actual config for', key, app.config.get(key)) return app.config.get(key)
def create_app(self): '''Start the wsgi application''' from orcid_service import app a = app.create_app(**{ 'SQLALCHEMY_DATABASE_URI': self.postgresql_url, 'SQLALCHEMY_ECHO': False, 'TESTING': True, 'PROPAGATE_EXCEPTIONS': True, 'TRAP_BAD_REQUEST_ERRORS': True }) return a
def get_app_config(key): opath = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) if opath not in sys.path: sys.path.insert(0, opath) from orcid_service import app as application app = application.create_app() with app.app_context() as c: print 'Getting actual config for', key, app.config.get(key) return app.config.get(key)
def create_app(self): '''Start the wsgi application''' return app.create_app()
from werkzeug.serving import run_simple from orcid_service import app application = app.create_app() if __name__ == "__main__": run_simple('0.0.0.0', 5000, application, use_reloader=False, use_debugger=False)
def create_app(self): '''Start the wsgi application''' a = app.create_app(**{'SQLALCHEMY_DATABASE_URI': 'sqlite:///'}) return a
def create_app(self): '''Start the wsgi application''' a = app.create_app(**{'SQLALCHEMY_DATABASE_URI': self.postgresql_url}) return a
def create_app(self): '''Start the wsgi application''' a = app.create_app({'SQLALCHEMY_BINDS': {'orcid': 'sqlite:///'}}) db.create_all(app=a) return a