是否有过滤器? - Django [英] Is there an OR filter? - Django
本文介绍了是否有过滤器? - Django的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有任何方式执行以下
is there any way of doing the following
Unicorn.objects.or_filter(magical=True).or_filter(unicorn_length=15).or_filter(skin_color='White').or_filter(skin_color='Blue')
其中 or_filter
代表孤立的比赛
我记得使用类似的东西但是找不到这个功能了!
I remember using something similar but cannot find the function anymore!
帮助会很棒!谢谢:)
推荐答案
您正在寻找 Q
对象。
You're looking for Q
objects.
这篇关于是否有过滤器? - Django的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文