Book.objects.filter(title='Hamlet')
Author.objects.filter(books__title='Hamlet')
print(Book.objects.filter(title='Hamlet').query)
print(Author.objects.filter(books__title='Hamlet').query)
Django override behavior of double underscore relationship lookup in queries