Django filter() lookup type documentation
django, filter, lookup, python
Solution
They are called "field lookups" in Django. Field lookups have pretty comprehensive documentation: https://docs.djangoproject.com/en/dev/ref/models/querysets/#id4
These are pretty well documented:
- `exact`
- `iexact`
- `contains`
- `icontains`
- `in`
- `gt`
- `gte`
- `lt`
- `lte`
- `startswith`
- `istartswith`
- `endswith`
- `iendswith`
- `range`
- `year`
- `month`
- `day`
- `week_day`
- `isnull`
- `search`
- `regex`
- `iregex`
Problem
I looked on Django's documentation and Googled every varation of the phrase but I cannot find any documentation that exactly describes the behaviour of lookuptypes. ``` app.objects.filter(column__lookuptype=criteria) ``` I have found documentation on which lookuptypes I can use but not what they do or how to use them. For example, I have no bloody clue what `__gte` does, but I cannot find good documentation on what it does either. Is there documentation that I overlooked? Any pointers in the right direction would be greatly appreciated. Thanks!