Пример #1
0
def rebuild_db():

    db.drop_all()
    db.create_all()
    test_user = User(email="admin", password=hash("test"))
    db.session.add(test_user)

    db.session.commit()
    return
Пример #2
0
def rebuild_db():

    db.drop_all()
    db.create_all()
    test_user = User(email="admin", password=hash(app.config['ADMIN_PASSWORD']))
    db.session.add(test_user)

    db.session.commit()
    return