Is there an OR filter? - Django

is there a way to do the following

Unicorn.objects.or_filter(magical=True).or_filter(unicorn_length=15).or_filter(skin_color='White').or_filter(skin_color='Blue')

where or_filterstands for isolated compliance


I remember using something similar, but I can no longer find the function!

Help would be great! Thank:)

+3
source share
1 answer

You are looking for Qobjects .

+7
source

Source: https://habr.com/ru/post/1748312/


All Articles