3๐
โ
Iโve done this before using NestedHyperlinkedRelatedField
and it definitely works. My guess is that your configuration is not correct. One thing I noticed is that you use parent_lookup_url_kwargs while in my case I use parent_lookup_kwargs.
Based on your explanation I think it needs to look like this
NestedHyperlinkedRelatedField(...,
parent_lookup_kwargs={
'resource_a_pk': '<how to reach resource_a pk from resource_b>'})
๐คVignesh
Source:stackexchange.com