title: Django QuerySet: Is it possible to filter for field__is_null for FloatFields?
body: <p>I want to be able to query a model for records where the is no value for a particular float field. The problem is the basic query:</p>
  
  <pre><code> Model.objects.filter(float_field__is_null=True)
  </code></pre>
  
  <p>returns the following error: <code>django.core.exceptions.FieldError: Unsupported lookup 'is_null'</code>.</p>
  
  <p>To test, create the following model:</p>
  
  <pre><code>class FloatFieldModel(models.Model):
      date = models.DateField()
      val = models.FloatField(blank=True, null=True)
  </code></pre>
  
  <p>Then:</p>
  
  <pre><code>&gt;&gt;&gt; objects = FloatFieldModel.objects.filter(val__is_null=True)
  &gt;&gt;&gt; django.core.exceptions.FieldError: Unsupported lookup 'is_null' ...
  </code></pre>
  
  <p>How can I filter a model for records where there is no value for a particular float field? In other words, what is the best work around?</p>
  
  <p>What I want to be able to do is the set up a routine to only update rows without any values, but skip those rows already with a specified value (while making most efficient use of my database). What I was trying looks something like:</p>
  
  <pre><code>for date in dates:
      try:
          FloatFieldModel.objects.filter(
              date=date,
              val__is_null=True
          ).update(val=42.0)
      except FloatFieldModel.DoesNotExist:
          pass
  </code></pre>
  
  <p>I imagine I could do something like:</p>
  
  <pre><code>objects = FloatFieldModel.objects.all()
  for obj in objects:
      if obj.val is None and obj.date in set(dates):
          obj.val = 42.0
          obj.save()
  </code></pre>
  
  <p>I was trying for a more efficient process though, rather than on which required reading each object from the database into memory before saving.</p>