コード例 #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()