title: How to use the 'reverse' of a Django ManyToMany relationship?
body: <p>I'm coming from a Rails background, and am having a bit of trouble making use of the "Association Methods" provided in Django.  I have two models (which have been simplified for the sake of brevity), like so:</p>
  
  <pre><code>class User(models.Model):
      username = models.CharField(max_length=100, unique=True)
      companies = models.ManyToManyField('Company', blank=True)
  
  class Company(models.Model):
      name = models.CharField(max_length=255)
  </code></pre>
  
  <p>According to the Django documentation:</p>
  
  <blockquote>
    <p>"It doesn't matter which model has the ManyToManyField, but you should only put it in one of the models -- not both.".</p>
  </blockquote>
  
  <p>So I understand that if I have an instance of a User, called user, I can do:</p>
  
  <pre><code>user.companies
  </code></pre>
  
  <p>My question is how do I do the reverse?  How do I get all users that belong to a Company instance, let's say Company:</p>
  
  <pre><code>company.users # This doesn't work!
  </code></pre>
  
  <p>What's the convention to do this?  The documentation that I've read doesn't really cover this.  I need the association to work both ways, so I can't simply move it from one model to the other.</p>