title: Django many-to-many
body: <pre><code>class Actor(models.Model):
      name = models.CharField(max_length=50)
  
      def __str__(self):
        return self.name
  
  
  class Movie(models.Model):
      title = models.CharField(max_length=50)
      actors = models.ManyToManyField(Actor)
  
      def __str__(self):
         return self.title
  </code></pre>
  
  <p>how can I access to the movies of an actor from Actor object in a template ?</p>
  
  <p>I need to do it in both directions.</p>
  
  <p>This worked from movies to actors.</p>
  
  <pre><code>{{movie.actors.all}}
  </code></pre>