6👍
✅
Person.objects.filter(teacher__isnull=False)
# return Person who has a teacher pointing to it
Source:stackexchange.com
6👍
Person.objects.filter(teacher__isnull=False)
# return Person who has a teacher pointing to it