from django.db.models import Q
Post.objects.filter(Q(userBy=some_user) | Q(userBy__accept_user__user1=
    some_user) | Q(userBy__request_user__user2=some_user)).distinct()
Complex query with Django (posts from all friends)