title: range filter not working in django
body: <p>I want to filter my queryset on the basis of two values.</p>
  
  <p>I want result between two numbers.I am trying some code but it is not working .It did not return me proper result.
  my code</p>
  
  <pre><code>def project(request):
      try:
  
          proTitle = request.GET.get('title')
          ProDescription = request.GET.get('description')
          funAria = request.GET.get('funAria')
          femaleReq = request.GET.get('femaleReq')
          cost_gte = int(request.GET.get('cost_gte'))
          cost_lte = int(request.GET.get('cost_lte'))
      except:
          pass
  
  
      if cost_gte and cost_lte :
          list4 = []
  
          result = Project.objects.filter(budgeted_cost__gte=cost_gte , budgeted_cost__lte=cost_lte )
          print result
          for res in result:
  
              list4.append(res.project_id)
          data ={'cost result':list4}
          return HttpResponse(json.dumps(data))
  
  
  
  
  return HttpResponse(json.dumps(data), content_type='application/json')
  </code></pre>
  
  <p>Some time it returns all product and some time it return none.I cant understand why it is not working.</p>
  
  <p>i also try by range</p>
  
  <pre><code>result = Product.objects.filter(cost__range=(cost_gte,cost_lte))
  </code></pre>
  
  <p>but is also behave same.Please guide me what i am doing wrong.</p>