(self, attrs_dict)
插入数据
插入数据
插入数据
def save(self, attrs_dict):
        """ 插入数据 """
        for key, value in attrs_dict.items():
            if hasattr(self, key) and key != 'id':
                setattr(self, key, value)
def save ( self , attrs_dict ) : for key , value in attrs_dict . items ( ) : if hasattr ( self , key ) and key != 'id' : setattr ( self , key , value )