Reference
QuerySet API reference
Case-insensitive containment test. Example: SQL equivalent: (The exact SQL syntax varies for each database engine.) NOTE: When using the SQLite backend and non-ASCII strings, bear in mind the > database note about string comparisons.
dev
Reference
QuerySet API reference
Greater than. Example: SQL equivalent:
dev
Reference
QuerySet API reference
Greater than or equal to.
dev
Reference
QuerySet API reference
Less than.
dev
Reference
QuerySet API reference
Less than or equal to.
dev
Reference
QuerySet API reference
Case-sensitive starts-with. Example: SQL equivalent: (The exact SQL syntax varies for each database engine.) SQLite doesn’t support case-sensitive LIKE statements; startswith acts like istartswith for SQLite.
dev
Reference
QuerySet API reference
Case-insensitive starts-with. Example: SQL equivalent: (The exact SQL syntax varies for each database engine.) NOTE: When using the SQLite backend and non-ASCII strings, bear in mind the > database note about string comparisons.
dev
Reference
QuerySet API reference
Case-sensitive ends-with. Example: SQL equivalent: (The exact SQL syntax varies for each database engine.) NOTE: SQLite doesn’t support case-sensitive LIKE statements; endswith > acts like iendswith for SQLite. Refer to the database note documentation for more.
dev
Reference
QuerySet API reference
Case-insensitive ends-with. Example: SQL equivalent: (The exact SQL syntax varies for each database engine.) NOTE: When using the SQLite backend and non-ASCII strings, bear in mind the > database note about string comparisons.
dev
Reference
QuerySet API reference
Range test (inclusive). Example: SQL equivalent: You can use range anywhere you can use BETWEEN in SQL — for dates, numbers and even characters.
dev
Reference
QuerySet API reference
For datetime fields, casts the value as date. Allows chaining additional field lookups. Takes a date value.
dev
Reference
QuerySet API reference
For date and datetime fields, an exact year match. Allows chaining additional field lookups. Takes an integer year.
dev
Reference
QuerySet API reference
For date and datetime fields, an exact ISO 8601 week-numbering year match. Allows chaining additional field lookups. Takes an integer year.
dev
Reference
QuerySet API reference
For date and datetime fields, an exact month match. Allows chaining additional field lookups. Takes an integer 1 (January) through 12 (December).
dev
Reference
QuerySet API reference
For date and datetime fields, an exact day match. Allows chaining additional field lookups. Takes an integer day.
dev
Reference
QuerySet API reference
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.
dev
Reference
QuerySet API reference
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).
dev
Reference
QuerySet API reference
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).
dev
Reference
QuerySet API reference
For date and datetime fields, a ‘quarter of the year’ match. Allows chaining additional field lookups. Takes an integer value between 1 and 4 representing the quarter of the year.
dev
Reference
QuerySet API reference
For datetime fields, casts the value as time. Allows chaining additional field lookups. Takes a datetime.time value.
dev