예제 #1
0
 def run(self, **kwargs):
     role = user_datastore.create_role(**kwargs)
     print 'Role "%(name)s" created successfully.' % kwargs
예제 #2
0
파일: app.py 프로젝트: rosantiago/meyahil
def before_first_request():
    user_datastore.create_role(name='admin')
    user_datastore.create_user(username='******', email='*****@*****.**',
                               password='******', roles=['admin'])
예제 #3
0
파일: app.py 프로젝트: kcm/flask-security
def create_roles():
    for role in ('admin', 'editor', 'author'):
        user_datastore.create_role(name=role)
예제 #4
0
 def run(self, **kwargs):
     user_datastore.create_role(**kwargs)
     print 'Role "%(name)s" created successfully.' % kwargs
예제 #5
0
def create_roles():
    for role in ('admin', 'editor', 'author'):
        user_datastore.create_role(name=role)