2009/3/12 Malcolm Tredinnick <malc...@pointy-stick.com>: > The second one is close. However, since "user" is a User object, you > need to be a little more careful in the filter comparison and filter > against the UserProfile.user attribute. Thus: > > User.objects.filter(friend__user=user) > > Regards, > Malcolm
Thanks for the reply. User.objects.filter(friend__user=user) seems to be returning the people who 'user' calls a friend, not those who calls 'user' a friend...? Hope that makes more sense than it sounds. Basically, I want to know who is a 'fan' of 'user'. Cheers, Andrew --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---