I have been working on a project, where the project has a Model called Competition and under each completion I have a model called Artwork ( in foreign key relationship). I am using DRF and the problem I am facing is each artwork has a field called approved ( boolean ) and I want to retrieve all the approved artwork under a competition detail view.
How can I filter that data on Competition retrieve API view. I could not find any good example. Please help
Also I have been thinking about to make another api which will filter the artwork only based on the given competition id.
Please help me to find out the solution.