Пример #1
0
def create_roles():
    for role in ('admin', 'editor', 'author'):
        user_datastore.create_role(name=role, description=role)
    user_datastore.commit()
Пример #2
0
def create_roles():
    for role in ('admin', 'developer', 'teacher', 'student'):
        user_datastore.create_role(name=role, description=role)
    db.session.commit()