Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我查看了 Django 的文档并在 Google 上搜索了该短语的每个变体,但我找不到任何准确描述查找类型行为的文档。
app.objects.filter(column__lookuptype=criteria)
我找到了关于我可以使用哪些查找类型的文档,但没有找到它们的作用或如何使用它们。例如,我完全不知道它是做什么__gte的,但我也找不到关于它做什么的好的文档。
__gte
是否有我忽略的文档?
任何指向正确方向的指针将不胜感激。谢谢!
它们在 Django 中被称为“字段查找”。字段查找具有非常全面的文档:https ://docs.djangoproject.com/en/dev/ref/models/querysets/#id4
这些都有很好的记录:
exact
iexact
contains
icontains
in
gt
gte
lt
lte
startswith
istartswith
endswith
iendswith
range
year
month
day
week_day
isnull
search
regex
iregex
“字段查找”文档。