Example #1
0
def run():
    role = Role(name='admin', description='Administrator privileges')
    session.add(role)
    session.flush()
    with app.app_context():
        pw = utils.encrypt_password('test')
        datastore.create_user(email='*****@*****.**', password=pw,
                              roles=[role])
    session.commit()
Example #2
0
def run(app=None):
    app = app or lso.create_app(__name__)
    with app.app_context():
        add_admin()