What will be best option

11 views
Skip to first unread message

Manas Paul

unread,
Aug 14, 2020, 5:50:35 AM8/14/20
to Django users
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.
Reply all
Reply to author
Forward
0 new messages