If I have a list of objects acquired by some query (in this case Django models).
friends = Friend.objects.friends(user1)
How can I get the list of ids, so I can use it to search another model, like this:
items = Item.objects.get(pk__in=friends_ids).order_by('date')
I'm pretty sure the lambda expressions should be able to do it but I can't figure it out...