示例#1
0
文件: manage.py 项目: jmstaley/Noter
def createuser(password, email):
    """ create a new user """
    passwd = bcrypt.hashpw(password, bcrypt.gensalt())
    with app.test_request_context():
        create_user(passwd, email)
示例#2
0
文件: manage.py 项目: jmstaley/Noter
def initdb():
    """ create all database tables """
    with app.test_request_context():
        db.create_all()
示例#3
0
文件: manage.py 项目: jmstaley/Noter
def dropdb():
    """ drops all database tables """
    with app.test_request_context():
        db.drop_all()