title: Django ManyToMany with through model implementation
body: <p>So let's say I have these models in my Django app:</p>
  
  <pre><code>class Ingredient(models.Model):
      name = models.CharField(max_length=100)
  
      def __unicode__(self):
          return self.name
  
  class Recipe(models.Model):
      name = models.CharField(max_length=100)
      ingredients = models.ManyToManyField(Ingredient, 
          through='RecipeIngredient')
  
      def __unicode__(self):
          return self.name
  
  class RecipeIngredient(models.Model):
      recipe = models.ForeignKey(Recipe)
      ingredient = models.ForeignKey(Ingredient)
      quantity = models.DecimalField(max_digits=4, decimal_places=2)
      unit = models.CharField(max_length=25, null=True, blank=True)
  
      def __unicode__(self):
          return self.ingredient.name
  </code></pre>
  
  <p>Now I want to access a recipe's ingredients (really RecipeIngredients). Via the Django shell:</p>
  
  <pre><code>&gt;&gt;&gt; r = Recipe.objects.get(id=1)
  &gt;&gt;&gt; ingredients = RecipeIngredients.objects.filter(recipe=r)
  </code></pre>
  
  <p>This seems counter-intuitive and clunky to me. Ideally I'd like to be able to have a Recipe object and get RecipeIngredients from it directly.</p>
  
  <p>Is there a more elegant implementation of my models? Is there any way to improve my existing model implementation?</p>