title: Django get related info from Many to Many through table
body: <p>I have something similar to the following model</p>
  
  <pre><code>class User(Model):
      username = CharField(...)
  
  class Event(Model):
      event_name = CharField(...)
      event_rating = IntegerField
      users = ManyToManyField(User, through="UserEventAttendence")
  
  class UserEventAttendence(Model):
      user = ForeignKey(User)
      event = ForeignKey(Event)
      attended = BooleanField()
  
  class EventComments(Model):
      name = CharField(...)
      content = CharField(...)
      event = models.ForeignKey(Event, related_name='eventcomments', on_delete=models.CASCADE)
  </code></pre>
  
  <p>In my view I am trying to get all events, the users for each event, then from this filter out events that the current user is going to. Below is my current query (goes to a serializer afterwards and is then sent as a response)</p>
  
  <pre><code>events = models.Event.objects.using(db_to_use).prefetch_related(
              Prefetch('users', queryset=models.UserProfile.objects.using(db_to_use))
          ).prefetch_related(
              Prefetch('eventcomments', queryset=models.EventComments.objects.using(db_to_use))
          ).filter(usereventattendence__user_id=request.user.id)
  </code></pre>
  
  <p>But I need to somehow append the "attended" field from the "UserEventAttendence" model for each event (for the current user), but I don't have any clue how to go about it. </p>