I\'m working with API made from Django rest framework, I am trying to make a filter to a JSON This is my serializers.py file
serializers.py
from rest_framewo
You need to define filter backend and all related fields you're planning to filter on:
class EstablecimientoViewSet(viewsets.ModelViewSet): filter_backends = (filters.DjangoFilterBackend,) filter_fields = ('categoria', 'categoria__titulo',)
example:
URL?categoria__titulo=Categoria 1