I have a serializer that gives me everything fine.
ModelClassASerializer((serializers.ModelSerializer)):
.....
status = serializers.SerializerMethodField()
def get_status(self, obj):
....
status = ModelB.objects.get(id=obj.id).status
....
return status
class Meta:
model = ModelClassA
fields = (...)
But if I want to make a filtering based on that status, I can't. I am using django_filters.rest_framework.FilterSet for the filtering. There is no relation between models.
What is the best way to do that filtering?