Ejemplo n.º 1
0
def createuser(password, email):
    """ create a new user """
    passwd = bcrypt.hashpw(password, bcrypt.gensalt())
    with app.test_request_context():
        create_user(passwd, email)
Ejemplo n.º 2
0
def initdb():
    """ create all database tables """
    with app.test_request_context():
        db.create_all()
Ejemplo n.º 3
0
def dropdb():
    """ drops all database tables """
    with app.test_request_context():
        db.drop_all()