Reference
QuerySet API reference
QuerySet APIField lookups
Case-insensitive exact match. If the value provided for comparison is None, it will be interpreted as an SQL NULL (see isnull for more details). Example: SQL equivalents: Note the first query will match 'Beatles Blog', 'beatles blog', 'BeAtLes BLoG', etc.
Reference
QuerySet API reference
QuerySet APIField lookups
Case-sensitive containment test. Example: SQL equivalent: Note this will match the headline 'Lennon honored today' but not 'lennon honored today'. NOTE: SQLite doesn’t support case-sensitive LIKE statements; contains > acts like icontains for SQLite.
Reference
QuerySet API reference
QuerySet APIField lookups
Case-insensitive containment test. Example: SQL equivalent: NOTE: When using the SQLite backend and non-ASCII strings, bear in mind the > database note about string comparisons.
Reference
QuerySet API reference
QuerySet APIField lookups
Greater than. Example: SQL equivalent:
Reference
QuerySet API reference
QuerySet APIField lookups
Greater than or equal to.
Reference
QuerySet API reference
QuerySet APIField lookups
Less than.
Reference
QuerySet API reference
QuerySet APIField lookups
Less than or equal to.
Reference
QuerySet API reference
QuerySet APIField lookups
Case-sensitive starts-with. Example: SQL equivalent: SQLite doesn’t support case-sensitive LIKE statements; startswith acts like istartswith for SQLite.
Reference
QuerySet API reference
QuerySet APIField lookups
Case-insensitive starts-with. Example: SQL equivalent: NOTE: When using the SQLite backend and non-ASCII strings, bear in mind the > database note about string comparisons.
Reference
QuerySet API reference
QuerySet APIField lookups
Case-sensitive ends-with. Example: SQL equivalent: NOTE: SQLite doesn’t support case-sensitive LIKE statements; endswith > acts like iendswith for SQLite. Refer to the database note documentation for more.
Reference
QuerySet API reference
QuerySet APIField lookups
Case-insensitive ends-with. Example: SQL equivalent: NOTE: When using the SQLite backend and non-ASCII strings, bear in mind the > database note about string comparisons.
Reference
QuerySet API reference
QuerySet APIField lookups
Range test (inclusive). Example: SQL equivalent: You can use range anywhere you can use BETWEEN in SQL — for dates, numbers and even characters.
Reference
QuerySet API reference
QuerySet APIField lookups
For datetime fields, casts the value as date. Allows chaining additional field lookups. Takes a date value.
Reference
QuerySet API reference
QuerySet APIField lookups
For date and datetime fields, an exact year match. Allows chaining additional field lookups. Takes an integer year.
Reference
QuerySet API reference
QuerySet APIField lookups
For date and datetime fields, an exact ISO 8601 week-numbering year match. Allows chaining additional field lookups. Takes an integer year.
Reference
QuerySet API reference
QuerySet APIField lookups
For date and datetime fields, an exact month match. Allows chaining additional field lookups. Takes an integer 1 (January) through 12 (December).
Reference
QuerySet API reference
QuerySet APIField lookups
For date and datetime fields, an exact day match. Allows chaining additional field lookups. Takes an integer day.
Reference
QuerySet API reference
QuerySet APIField lookups
For date and datetime fields, return the week number (1-52 or 53) according to ISO-8601, i.e., weeks start on a Monday and the first week contains the year’s first Thursday.
Reference
QuerySet API reference
QuerySet APIField lookups
For date and datetime fields, a ‘day of the week’ match. Allows chaining additional field lookups. Takes an integer value representing the day of week from 1 (Sunday) to 7 (Saturday).
Reference
QuerySet API reference
QuerySet APIField lookups
For date and datetime fields, an exact ISO 8601 day of the week match. Allows chaining additional field lookups. Takes an integer value representing the day of the week from 1 (Monday) to 7 (Sunday).