[Answered ]-Django efficient way to combine 2 queries or make a compound one?

2👍

To check an M2M relation, you just do =, not contains:

Story.objects.filter(writers=request.user)

And you can use Q objects to do an or query:

Story.objects.filter(Q(wikiedit=True) | Q(writers=request.user))

Leave a comment