Skip to content
Advertisement

Filtering the specific data for response in DRF

I have following response data

JavaScript

But I want to remove the dictionary whose id = 10 from the response data ,how can I do that ?

I have following lines of code..

JavaScript

In serializers.py

JavaScript

Any help would be appreciated !!

Advertisement

Answer

What happens if you do something as following :

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement