title: Django filter not working
body: <p>my filter isn't working Whenever I access <a href="http://localhost:8080/payables/invoices/?status=NOT_PAID" rel="nofollow">http://localhost:8080/payables/invoices/?status=NOT_PAID</a> It just returns all the invoices. I have no runtime error, the parameter I enter simply seems to be ignored. I really don't understand, other than that, it works well.</p>
  
  <p><strong>views.py</strong></p>
  
  <pre><code>class InvoiceViewSet(viewsets.ViewSet):
      serializer_class = InvoiceSerializer
      filter_backend = filters.DjangoFilterBackend
      filter_fields = ('status','supplier',)
  
      def list(self,request,):
          queryset = Invoice.objects.filter()
          serializer = InvoiceSerializer(queryset, many=True)
          return Response(serializer.data)
  
      def retrieve(self, request, pk=None):
          queryset = Invoice.objects.filter()
          invoice = get_object_or_404(queryset, pk=pk)
          serializer = InvoiceSerializer(invoice)
          return Response(serializer.data)
  
  class InvoiceItemViewSet(viewsets.ViewSet):
  
      serializer_class = InvoiceItemSerializer
  
      def list(self,request,invoice_pk=None):
          queryset = InvoiceItem.objects.filter(invoice=invoice_pk)
          serializer = InvoiceItemSerializer(queryset,many=True)
          return Response(serializer.data)
  
  
      def retrieve(self,request,pk,invoice_pk):
          queryset = InvoiceItem.objects.filter(pk=pk,invoice=invoice_pk)
          invoice_item = get_object_or_404(queryset,pk=pk)
          serializer = InvoiceItemSerializer(invoice_item)
          return Response(serializer.data)
  </code></pre>
  
  <p><strong>url.py</strong></p>
  
  <pre><code>from django.conf.urls import url, include
  #viewset
  from rest_framework_nested import routers
  from payables.views import InvoiceViewSet,InvoiceItemViewSet
  
  router = routers.SimpleRouter()
  router.register(r'invoices', InvoiceViewSet,base_name='invoices')
  
  invoice_item_router = routers.NestedSimpleRouter(router,r'invoices',lookup='invoice')
  invoice_item_router.register(r'items', InvoiceItemViewSet, base_name='invoice_items')
  
  urlpatterns = [
      url(r'^',include(router.urls)),
      url(r'^',include(invoice_item_router.urls))
      ]
  </code></pre>