Permalink
Browse files

Using a values_list for getting all friends of a user example

  • Loading branch information...
1 parent 861db66 commit 0776da3589396848cfdb659f472342d40445e4cd @bsnux bsnux committed Jan 5, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 README.rst
View
@@ -78,7 +78,7 @@ Getting all friends of a user
``friends`` will be a list with all id's from ``user1`` friends::
- friends = [f.id for f in Friendship.objects.friends_of(user1)]
+ friends = Friendship.objects.friends_of(user1).values_list('id', flat=True)
See Also

0 comments on commit 0776da3

Please sign in to comment.