title: Django Rest queryset filter by url parameter
body: <p>I need to filter queryset in ListAPIView depending on url parameter. Basically, application lists all attendees (User) of an event with a call to API like <code>/events/:id/attendees/</code></p>
  
  <p>You can find serializers, models, urls and views below. I also wonder any other practices to do such end-point implementation in Django REST</p>
  
  <pre><code>**serializers.py**
  class AttendeeSerializer(serializers.ModelSerializer):
      user = UserSerializer()
  
      class Meta:
          model = Attendee
          fields = ('user', 'status')
  
  
  **views.py**
  class EventAttendeeList(generics.ListAPIView):
      queryset = Attendee.objects.all()
      serializer_class = AttendeeSerializer
      #permission_classes = (permissions.IsAuthenticatedOrReadOnly,)
  
      def get_queryset(self):
          # It should filter attendees by event_id posted in URL
          return Attendee.objects.all()
  
  **urls.py**
  
  url(r'^events/(?P&lt;pk&gt;[0-9]+)/attendees/$', views.EventAttendeeList.as_view()),
  
  
  **models.py**
  class Event(models.Model):
      name = models.CharField(max_length=500, blank=True)
      attendees = models.ManyToManyField(settings.AUTH_USER_MODEL, through='Attendee', related_name='attendees_event')
  
  
  class Attendee(models.Model):
      event = models.ForeignKey(Event, related_name="a_event")
      user = models.ForeignKey(settings.AUTH_USER_MODEL, related_name="a_user")
      requested_on = models.DateTimeField(default=timezone.now)
  </code></pre>