Django select_related filter
<p>I have the following Django models.</p>

<pre><code>class A(models.Model):
    tmp = models.ForeignKey(B)
    active = models.BooleanField()

class B(models.Model):
    active = models.BooleanField()
    archived = models.BooleanField()
</code></pre>

<p>Now I have the following query.</p>

<pre><code>A.objects.select_related(B).filter(active=True)
</code></pre>

<p>Now this fetches all the objects of B. Now how can I include a filter of <code>active=True</code> and <code>archived=False</code> in the <code>select_related</code> clause for model <code>B</code>.</p>