I would like to specify a custom lookup field on the action (different from the viewset default “pk”), i.e. But the router does not generate the correct urls: yields url: instead of I do not want to change the lookup field for the whole viewset though and have been unsuccessful in finding a way to do this for the action
Tag: django-rest-viewsets
DRF: How to pass extra context data to serializers
I was searching the net and found the similar problem but it doesn’t work in my case, Idk why. I try to put some extra data to context in serializer, but get only 3 default fields: request, view and format and no mention for my custom data. My model: My Serializer: My ModelViewSet: I was debugging it through PyCharm and