コード例 #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 tearDown(self):
     db.drop_all()
     self.app_context.pop()