Пример #1
0
 def create_app(self):
     '''Start the wsgi application'''
     a = app.create_app(**{
            'SQLALCHEMY_BINDS': {'myads': 'sqlite:///'},
            'SQLALCHEMY_ECHO': True,
            'TESTING': True,
            'PROPAGATE_EXCEPTIONS': True,
            'TRAP_BAD_REQUEST_ERRORS': True
         })
     db.create_all(app=a, bind=['myads'])
     return a
Пример #2
0
 def create_app(self):
     '''Start the wsgi application'''
     a = app.create_app(**{
            'SQLALCHEMY_BINDS': {'myads': 'sqlite:///'},
            'SQLALCHEMY_ECHO': False,
            'TESTING': True,
            'PROPAGATE_EXCEPTIONS': True,
            'TRAP_BAD_REQUEST_ERRORS': True
         })
     db.create_all(app=a)
     return a
Пример #3
0
 def create_app(self):
     '''Start the wsgi application'''
     from myads_service import app 
     a = app.create_app(**{
            'SQLALCHEMY_DATABASE_URI': 'sqlite://',
            'SQLALCHEMY_ECHO': False,
            'TESTING': True,
            'PROPAGATE_EXCEPTIONS': True,
            'TRAP_BAD_REQUEST_ERRORS': True
         })
     db.create_all(app=a)
     return a
Пример #4
0
 def create_app(self):
     '''Start the wsgi application'''
     a = app.create_app(
         **{
             'SQLALCHEMY_BINDS': {
                 'myads': 'sqlite:///'
             },
             'SQLALCHEMY_ECHO': True,
             'TESTING': True,
             'PROPAGATE_EXCEPTIONS': True,
             'TRAP_BAD_REQUEST_ERRORS': True,
             'MYADS_BUMBLEBEE_OPTIONS': {
                 'foo': 'bar'
             }
         })
     db.create_all(app=a, bind=['myads'])
     return a