示例#1
0
def db_setup_dev(name, realname, pw, email):
    db.drop_all()
    db.create_all()
    admin = models.User(name, realname, pwd_context.encrypt(pw), email)
    db.session.add(admin)
    db.session.commit()
示例#2
0
def db_reset():
    db.drop_all()
    db.create_all()