📜  django 序列化程序排除字段 - Python 代码示例

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

代码示例1
class BLContainerSerializer(serializers.ModelSerializer):
    class Meta:
        model = Container
        exclude = ('field1', )


class BLcontainerMergedSerializer(serializers.ModelSerializer):
    container = BLContainerSerializer()

    class Meta:
        model = BLcontainer