Xavier,
Not the answer I was expecting.  I didn't think of doing it that way, but 
it makes sense.
Thanks,
Daniel

On Sunday, 3 July 2016 21:07:22 UTC+1, Xavier Ordoquy wrote:
>
> Hi, 
>
> > Le 3 juil. 2016 à 22:03, Daniel Grace <[email protected] <javascript:>> 
> 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.

Reply via email to