title: How to do `itertools.product(queryset_a, queryset_b)` via Django ORM?
body: <p>I  have two queryset, and need the product (aka &quot;CROSS JOIN&quot;).</p>
  <p>I could use this:</p>
  <pre><code>itertools.product(queryset_a, queryset_b)
  </code></pre>
  <p>BUT the result is too big, and I need to paginate it.</p>
  <p>This means, I need to avoid <code>itertools.product()</code> and use the Django ORM to create the product in the database.</p>
  <p>How to do <code>itertools.product(queryset_a, queryset_b)</code> via Django ORM?</p>
  <p>I use PostgreSQL.</p>
  <p>Example of what I mean with &quot;product&quot;:</p>
  <pre><code>itertools.product(['a', 'b', 'c'], [1, 2, 3])
  
  [('a', 1), ('a', 2), ('a', 3), 
   ('b', 1), ('b', 2), ('b', 3),
   ('c', 1), ('c', 2), ('c', 3)]
  </code></pre>
  <p>The resulting Queryset needs to support <code>.count()</code> since I want to paginate it.</p>
  <pre><code>class Term(models.Model):
      name = models.CharField(max_length=1024)
  
  class Location(models.Model):
      name = models.CharField(max_length=1024)
  </code></pre>