title: Flattening one-to-many relationship in Django
body: <p>I have a few model classes with basic one-to-many relationships.  For example, a book has many recipes, and each recipe has many ingredients:</p>
  
  <pre><code>class Book(models.Model):
      name = models.CharField(max_length=64)
  
  class Recipe(models.Model):
      book = models.ForeignKey(Book)
      name = models.CharField(max_length=64)
  
  class Ingredient(models.Model):
      text = models.CharField(max_length=128)
      recipe = models.ForeignKey(Recipe)
  </code></pre>
  
  <p>I'd like a flat list of all ingredients in all recipes from a particular book.  What's the best way to express this in Python?</p>
  
  <p>If I was using LINQ, I might write something like this:</p>
  
  <pre><code>var allIngredients = from recipe in book.Recipes
                       from ingredient in recipe.Ingredients
                       select ingredient;
  </code></pre>