Beispiel #1
0
 def get_user_obj(self, username):
     """获取用户对象"""
     status = 611
     obj = None
     obj_list = User.get_all_obj()  # 通过类名获取该类下的所有对象
     for obj in obj_list:
         if username == obj.username:
             status = 654
             obj = obj
             return {"status": status, "obj": obj}
     return {"status": status, "obj": obj}