4 ms·
The docs show both of those as working examples, but Q supports using & for "and", and can be combined in any way - you could also do this: .filter(Q(column_
by Izkata 3y ago
The docs show both of those as working examples, but Q supports using & for "and", and can be combined in any way - you could also do this:
.filter(Q(column_a='value1') & (Q(column_b__isnull=True) | Q(column_b='value2')))