title: In Django REST is there a way of setting the key in a RetrieveAPIView, rather than filtering in a ListAPIView?
body: <p>In Django REST I have a ListAPIView, which I use to fetch records (usually just the one) based on the request user:</p>
  
  <pre><code>class UserPageView(ListAPIView):
      serializer_class = UserPageSerializer
      def get_queryset(self):
          return User.objects.filter(pk=self.request.user.pk)
  </code></pre>
  
  <p>Because I am only getting one record I was wondering if there is a way to use RetrieveAPIView instead (to achieve the same results).  Either by somehow wrapping the view and calling it with the kwargs set to the request user's pk.  Or alternatively override the primary key in the RetrieveAPIView setting it to the request user's pk?</p>
  
  <p><strong>Update</strong></p>
  
  <p>It is possible to use a RetrieveAPIView without a URL parameter, by overriding get_object:</p>
  
  <pre><code>class UserPageView(RetrieveAPIView):
      serializer_class = UserPageSerializer
      def get_object(self):
          return get_object_or_404(User, pk=self.request.user.pk)
  </code></pre>