예제 #1
0
def createall():
    """
    Initialize Database and populate with seed data.

    """
    app = create_app()
    with app.app_context():
        db.drop_all()
        db.create_all()

        db.session.commit()
예제 #2
0
파일: cmd.py 프로젝트: srt32/rodeo
def createall():
    """
    Initialize Database and populate with seed data.

    """
    app = create_app()
    with app.app_context():
        db.drop_all()
        db.create_all()

        db.session.commit()
예제 #3
0
파일: base.py 프로젝트: cdm-ium/rodeo
 def setUp(self):
     self.app = create_app(testing=True)
     self.app_context = self.app.app_context()
     self.app_context.push()
     self.client = self.app.test_client()
     db.create_all()