def run(self, **kwargs): role = user_datastore.create_role(**kwargs) print 'Role "%(name)s" created successfully.' % kwargs
def before_first_request(): user_datastore.create_role(name='admin') user_datastore.create_user(username='******', email='*****@*****.**', password='******', roles=['admin'])
def create_roles(): for role in ('admin', 'editor', 'author'): user_datastore.create_role(name=role)
def run(self, **kwargs): user_datastore.create_role(**kwargs) print 'Role "%(name)s" created successfully.' % kwargs