title: Querying Django - Return objects where exactly one field is not null
body: <p>Using Django 1.8</p>
  
  <p>I'm trying to filter a model on whether only exactly one of the chosen fields are populated. If I had a model like this, I would like to be able to filter on it as below.</p>
  
  <pre class="lang-py prettyprint-override"><code>class MyModel(models.Model):
      field_a = models.IntegerField(null=True)
      field_b = models.IntegerField(null=True)
      field_c = models.IntegerField(null=True)
      field_d = models.IntegerField(null=True)
  </code></pre>
  
  <pre><code>(field_a__isnull=False, field_b__isnull=True, field_c__isnull=True, field_d__isnull=True)
  OR
  (field_a__isnull=True, field_b__isnull=False, field_c__isnull=True, field_d__isnull=True)
  OR
  (field_a__isnull=True, field_b__isnull=True, field_c__isnull=False, field_d__isnull=True)
  OR
  (field_a__isnull=True, field_b__isnull=True, field_c__isnull=True, field_d__isnull=False)
  </code></pre>
  
  <p>So the queryset should return all objects which have only one of the fields in the model populated and the rest of the fields as null. Is there a way to achieve this through Django queries?</p>