[Django]-Filtering Django models by existence of a related object

5👍

You can filter users using the backward relation from users to notes, lets try something like this

Note.objects.filter(user__note__color='red')
👤Darwin

Leave a comment