title: Django - filtering on foreign key properties
body: <p>I'm trying to filter a table in Django based on the value of a particular field of a <code>ForeignKey</code>.</p>
  
  <p>For example, I have two models:</p>
  
  <pre><code>class Asset(models.Model):
      name = models.TextField(max_length=150)
      project = models.ForeignKey('Project')
  
  class Project(models.Model):
      name = models.TextField(max_length=150)
  </code></pre>
  
  <p>I'd like to filter my asset list based on the name of the associated project.</p>
  
  <p>Currently, I am performing <strong>two</strong> queries:</p>
  
  <pre><code>project_list = Project.objects.filter(name__contains="Foo")
  asset_list = Asset.objects.filter(desc__contains=filter,
                                    project__in=project_list).order_by('desc')
  </code></pre>
  
  <p>I'm wondering if there is a way to specify this kind of filtering in the main query?</p>