title: django rest framework filter
body: <p>I'm working with API made from Django rest framework,
  I am trying to make a filter to a JSON 
  This is my  <code>serializers.py</code> file</p>
  
  <pre><code>from rest_framework import serializers
  from .models import Establecimiento,Categoria,Ciudad,Zona
  import django_filters
  
  class EstablecimientoSerializer(serializers.ModelSerializer):
      class Meta:
          model = Establecimiento
          depth = 1
  
          fields =  ('nombre',
                     'ciudad',
                     'categoria',
                     'direccion',
                     'telefono',
                     'precioMinimo',
                     'precioMaximo',)
  </code></pre>
  
  <p>and this my <code>views.py</code> file</p>
  
  <pre><code>from rest_framework import viewsets
  from .serializers import EstablecimientoSerializer, CategoriaSerializer
  from models import *
  from rest_framework import filters
  from rest_framework import generics
  
  class EstablecimientoViewSet(viewsets.ModelViewSet):
      queryset = Establecimiento.objects.all()
      serializer_class = EstablecimientoSerializer
      filter_fields = ('categoria',)
  </code></pre>
  
  <p>Then in  the <code>EstablecimientoViewSet</code> class, I put a <code>filter_fields = ('categoria',)</code>
  to filter the  url's API  with the category field</p>
  
  <p>If I add the filter to the query parameters, the result set does not change, it shows all data unfiltered.</p>
  
  <pre><code>...establecimiento?establecimiento=bar
  </code></pre>
  
  <p>How can I make this filter  about this model?</p>