Closed davidtgq closed 7 years ago
You can do something similar to what is described in #17
children = ChildSerializer(many=True, attr='child_set.all', call=True)
Does that work for you?
Yes I tried that and it works, thanks. I did not put call=True
before, trying attr='child_set.all()'
did not work. Thanks for the help, this is even better.
It wasn't working with nested reverse foreign-keys, need to add
.all()
:This enables to do something like: