added documentation for the query kwargs introduced by [1534]
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1536 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
7dbff908b5
commit
4ed3d57184
|
@ -152,9 +152,9 @@ translates (roughly) into the following SQL::
|
|||
|
||||
The DB API supports the following lookup types:
|
||||
|
||||
=========== ==============================================================
|
||||
============= ==============================================================
|
||||
Type Description
|
||||
=========== ==============================================================
|
||||
============= ==============================================================
|
||||
exact Exact match: ``polls.get_object(id__exact=14)``.
|
||||
iexact Case-insensitive exact match:
|
||||
``polls.get_list(slug__iexact="foo")`` matches a slug of
|
||||
|
@ -164,7 +164,9 @@ The DB API supports the following lookup types:
|
|||
that contain "spam" in the question. (PostgreSQL and MySQL
|
||||
only. SQLite doesn't support case-sensitive LIKE statements;
|
||||
``contains`` will act like ``icontains`` for SQLite.)
|
||||
notcontains negated ``contains``
|
||||
icontains Case-insensitive containment test.
|
||||
inotcontains negated ``icontains``
|
||||
gt Greater than: ``polls.get_list(id__gt=4)``.
|
||||
gte Greater than or equal to.
|
||||
lt Less than.
|
||||
|
@ -177,9 +179,13 @@ The DB API supports the following lookup types:
|
|||
and MySQL only. SQLite doesn't support case-sensitive LIKE
|
||||
statements; ``startswith`` will act like ``istartswith`` for
|
||||
SQLite.)
|
||||
notstartswith negated ``startswith``
|
||||
endswith Case-sensitive ends-with. (PostgreSQL and MySQL only.)
|
||||
notendswith negated ``endswith``
|
||||
istartswith Case-insensitive starts-with.
|
||||
inotstartswith negated ``istartswith``
|
||||
iendswith Case-insensitive ends-with.
|
||||
inotendswith negated ``iendswith``
|
||||
range Range test:
|
||||
``polls.get_list(pub_date__range=(start_date, end_date))``
|
||||
returns all polls with a pub_date between ``start_date``
|
||||
|
@ -190,7 +196,7 @@ The DB API supports the following lookup types:
|
|||
day For date/datetime fields, exact day match.
|
||||
isnull True/False; does is IF NULL/IF NOT NULL lookup:
|
||||
``polls.get_list(expire_date__isnull=True)``.
|
||||
=========== ==============================================================
|
||||
============= ==============================================================
|
||||
|
||||
Multiple lookups are allowed, of course, and are translated as "AND"s::
|
||||
|
||||
|
|
Loading…
Reference in New Issue