[Answer]-Django Nested ManyToMany QuerySet

1👍

One way is:

def all_books(self):
    return Book.objects.filter(group__person=self)

That’ll return all books in at least one group of which the user is a member.

Leave a comment