📜  在序列化程序 django 中覆盖更新 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:04.584000             🧑  作者: Mango

代码示例1
def update(self, instance, validated_data):
    # MANIPULATE DATA HERE BEFORE INSERTION

    instance = super(ProduitUpdateSerializer,self).update(instance, validated_data)
    # ADD CODE HERE THAT YOU WANT TO VIEW
    return instance