Open MicroDreamIT opened 1 year ago
I'm not going to outright close this because it might make sense to have some extra serializers, but we can't change the existing one.
I think it makes sense to have both, because in many use cases you don't want to expose the tag ID.
Let's keep this open and maybe we can have someone contribute a more detailed serializer for those who want it :+1: At the very least we can write a very small doc guide to just point out how to easily do this with DRF
I think the way forward here would be:
DetailedTaggedItemSerializer
that could render out a TaggedItem
as {name: "foo bar", slug: "foo_bar", id: 1}
DetailedTagListField
that would probably just be a ListField
that uses DetailedTaggedItemSerializer
in the child
create
/update
first? I dunno)
here is my Model is look like
model.py
serializers.py
the Result I am having:
but expected tags nest should look like