0
I am trying to create a filter but get error: Related Field got invalid lookup: icontains
msm if I use the related_name before the attribute n works.
class VersoesPublicadasList(generics.ListAPIView):
"""
get:
Retorna uma lista de todas as publicações
"""
queryset = VersoesPublicadas.objects.all()
serializer_class = VersoesPublicadasSerializer
filter_backends = [SearchFilter]
search_fields = ['publicacoes_empresas_pb_nome']
Someone’s been through it?
Post the code from where you are applying the filter.
– Augusto A
Posted the code snippet, @Augustoa
– Emerson Vieira