RetrieveAPIView without lookup field? : <p>By default RetrieveAPIView or RetrieveUpdateAPIView requires <code>lookup_field</code> to retrieve Model. </p>

<p>However in my case, I want to retrieve my model by self.request.user. </p>

<p>Here is views.py example</p>

<pre><code>class ProfileRetrieveAndUpdateProfile(generics.RetrieveUpdateAPIView):
    queryset = Profile.objects.all()
    serializer_class = ProfileRetrieveAndUpdateSerializer
    lookup_field = 'user_id'

    def get_queryset(self):
        qs = Profile.objects.all()
        logged_in_user_profile = qs.filter(user=self.request.user)
        return logged_in_user_profile
</code></pre>

<p>Can I use RetrieveAPIView <strong>without lookup_field</strong>?</p>
