title: Django Filtering based on field values in
body: <p>I am using Django and I want to use filters in that</p>
  
  <p>My product and company Models are </p>
  
  <pre><code>class Product(models.Model):
      name = models.CharField(max_length=200)
      companyId = models.ForeignKey(Comapany)
  
  class Company(models.Model):
      domain = models.CharField(max_length=200)
  </code></pre>
  
  <p>I want to retrieve Products based on currently user's companyId. So I have implemented My view like this..</p>
  
  <pre><code>class ListProducts(APIView):
      authentication_classes = (authentication.TokenAuthentication,)
      permission_classes = (permissions.IsAdminUser,)
  
  def get(self, request):
          if request.user.is_authenticated():
              userCompanyId = request.user.get_profile().companyId
          products = Product.objects.filter(companyId__id__exact = userCompanyId)
          serializer = ProductSerializer(products)
          return Response(serializer.data)
  </code></pre>
  
  <p>My Product Data</p>
  
  <pre><code>{
     "_id": ObjectId("5284ceaae9cfff79368e1f29"),
     "companyId": "528458c4bbe7823947b6d2a3",
     "name": "Apple Juice" 
  }
  {
     "_id": ObjectId("5267bb4ebbe78220588b4567"),
     "companyId": "52674f02bbe782d5528b4567",
     "name": "Small Soft &amp; Moist Cranberry" 
  }
  </code></pre>
  
  <p>My company Data</p>
  
  <pre><code>{
     "_id": ObjectId("528458c4bbe7823947b6d2a3"),
     "domain": "Manufacturing" 
  }
  {
     "_id": ObjectId("52674f02bbe782d5528b4567"),
     "domain": "Manufacturing" 
  }
  </code></pre>
  
  <p>I am getting output as <code>[]</code></p>
  
  <p>The problem is that while studying filters from django doc I am not able to get it.. SO please help me..</p>