title: Django: Determining ManyToMany Relationship in Template
body: <p>I had a <code>ForeignKey</code> relationship set up like this:</p>
  
  <pre><code>class WatchList(models.Model):
      user = models.ForeignKey(User)
  
  class Thing(models.Model)
      watchlist = models.ForeignKey(WatchList, null=True, blank=True)
  </code></pre>
  
  <p>This allowed me to conditionally show different messages in my template like this:</p>
  
  <pre><code>{% if thing.watchlist.user != request.user %}
       Something
  {% else %}
       Nothing
  {% endif %}
  </code></pre>
  
  <hr>
  
  <p>However, now that I have changed my relationship from <code>ForeignKey</code> to <code>ManyToManyField</code>, this kind of in-template filtering no longer works:</p>
  
  <pre><code>class WatchList(models.Model):
      user = models.ForeignKey(User)
  
  class Thing(models.Model)
      watchlist = models.ManyToManyField(WatchList)
  </code></pre>
  
  <p>Trying this type of templatetag filtering in the template reveals an <code>AttributeError: 'ManyRelatedManager' object has no attribute 'user'</code>.</p>
  
  <p>How do I filter objects in my template with a ManyToMany relationship so that I can show different messages if <code>{% if thing.watchlist.user != request.user %}</code>?</p>