Exemplo n.º 1
0
 def create_default_users():
     UserDB.remove_all_users()
     users = [
         User({
             "username": "******",
             "password": "******",
             "email": "*****@*****.**",
             "mobile": "12345678900",
             "sex": "male",
             "permission": "admin"
         })
     ]
     for u in users:
         UserDB.add_user(u)
         logging.info("add user %s success..." % u.username)
Exemplo n.º 2
0
 def add_user(user):
     return UserDB.add_user(user)