5👍
✅
Django by default join multiple conditions with AND operator. Your query will only exclude rows with product__sale_price=0
AND field_value=''
AND field_value__isnull=False
. If you want OR operator between your conditions, you have to use Q
.
from django.db.models import Q
...exclude(Q(product__sale_price=0) | Q(field_value='') | Q(field_value__isnull=False))
Source:stackexchange.com