def create_app(self):
     '''Start the wsgi application'''
     a = app.create_app({
         'SQLALCHEMY_BINDS' : {
             'orcid':        'sqlite:///'
         }
        })
     db.create_all(app=a)
     return a
示例#2
0
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)
示例#3
0
 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
示例#4
0
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()
 def create_app(self):
     '''Start the wsgi application'''
     return app.create_app()
示例#7
0
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
示例#9
0
 def create_app(self):
     '''Start the wsgi application'''
     a = app.create_app(**{'SQLALCHEMY_DATABASE_URI': self.postgresql_url})
     return a
示例#10
0
 def create_app(self):
     '''Start the wsgi application'''
     a = app.create_app({'SQLALCHEMY_BINDS': {'orcid': 'sqlite:///'}})
     db.create_all(app=a)
     return a