title: Logical operations in django filter
body: <p>I need to get my queryset where:  </p>
  
  <pre><code>(a="a" AND b=None) OR (a=None AND b="b")
  </code></pre>
  
  <p>I know about Q objects in django, but this syntax doesn't works:  </p>
  
  <pre><code>cls.objects.filter(models.Q(a="a", b=None) | models.Q(a=None, b="b"))
  </code></pre>
  
  <p>I am absolutely sure my database contains expected objects. But all I get is the empty queryset.<br>
  I guess there is some problem with syntax here. But where?<br>
  <a href="https://i.imgur.com/maQi0uU.png" rel="nofollow noreferrer">excepted rows picture. i need only first one and second one</a>  </p>