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)
def add_user(user): return UserDB.add_user(user)