title: multiple model filtering in django views
body: <p>I'm trying to get a query from a specific model. I'm having trouble getting it to filter the data correctly. </p>
  
  <p>I've already fixed one bug where it was returning other users data but now its returning duplicates of one row of data in the model.</p>
  
  <pre><code>events = Event.objects.filter(club=user.get_profile().main_club) | Event.objects.filter(invclub=user.get_profile().main_club) | Event.objects.filter(invited=user)
  </code></pre>
  
  <p>That is the query I'm trying to execute.</p>
  
  <p>The result that I am aiming for, is to have all events that the user has either manually been invited to <strong>(invited)</strong> their club has been invited <strong>(invclub)</strong> or their club is the host club <strong>(club)</strong> </p>
  
  <p>I am probably approaching this in the wrong direction and there may very well be an easier way of doing this. Any help is greatly appreciated.</p>
  
  <p>EDIT: comms.models</p>
  
  <pre><code>class Event(models.Model):
       title = models.CharField(max_length='255')
       club = models.ForeignKey(Club, verbose_name="Host Club")
       invclub = models.ManyToManyField(Club, verbose_name="Invited Clubs", related_name="Invited Clubs", blank=True)
       l_desc = models.CharField(max_length='255', verbose_name="Location Description")
       l_long = models.CharField(max_length='255', verbose_name="Longitude", blank=True)
       l_lat = models.CharField(max_length='255', verbose_name="Latitude", blank=True)
       edate = models.DateTimeField(default=datetime.now, verbose_name="Event Date", blank=True)
       length = models.CharField(max_length='255', verbose_name="Event Length", blank=True)
       invited = models.ManyToManyField(User, related_name="Invited Users", blank=True)
       attending = models.ManyToManyField(User, related_name="Attending Users", blank=True)
       declined = models.ManyToManyField(User, related_name="Declined Users", blank=True)
       description = models.TextField(blank=True)
  </code></pre>
  
  <p><strong>Fixed:</strong> </p>
  
  <p>Final solution uses the Q() Objects as suggested below, whilst appending the .distinct() function to ensure no duplicates are returned. </p>