Hi,

> Le 3 juil. 2016 à 22:03, Daniel Grace <[email protected]> a écrit :
> 
> How is it possible to do the equivalent of the following?
> 
> class UserDetailsView(RetrieveAPIView):
>     serializer_class = UserDetailsSerializer
>     queryset = User.objects.all(pk=request.user)
> 
> I'm guessing that this actual code won't work.

Indeed it won’t work.
The documentation explains it at the following url: 
http://www.django-rest-framework.org/api-guide/filtering/#filtering-against-the-current-user

Regards,
Xavier,
Linovia

-- 
You received this message because you are subscribed to the Google Groups 
"Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

Reply via email to