djano 模型查询
生活随笔
收集整理的這篇文章主要介紹了
djano 模型查询
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
2019獨角獸企業重金招聘Python工程師標準>>>
__exact ? ? ? ?精確等于 like 'aaa' __iexact ? ?精確等于 忽略大小寫 ilike 'aaa' __contains ? ?包含 like '%aaa%' __icontains ? ?包含 忽略大小寫 ilike '%aaa%',但是對于sqlite來說,contains的作用效果等同于icontains。 __gt ? ?大于 __gte ? ?大于等于 __lt ? ?小于 __lte ? ?小于等于 __ne 不等于 __in ? ? 存在于一個list范圍內 __startswith ? 以...開頭 __istartswith ? 以...開頭 忽略大小寫 __endswith ? ? 以...結尾 __iendswith ? ?以...結尾,忽略大小寫 __range ? ?在...范圍內 __year ? ? ? 日期字段的年份 __month ? ?日期字段的月份 __day ? ? ? ?日期字段的日 __isnull=True/False __isnull=True 與 __exact=None的區別轉載于:https://my.oschina.net/jingshishengxu/blog/77599
總結
以上是生活随笔為你收集整理的djano 模型查询的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: HDU 3400 Line belt【三
- 下一篇: 2012年度最新免费web开发设计资源荟