Loading docs/_ext/djangodocs.py +1 −1 Original line number Diff line number Diff line Loading @@ -38,7 +38,7 @@ def setup(app): app.add_crossref_type( directivename = "fieldlookup", rolename = "lookup", indextemplate = "pair: %s, field lookup type", indextemplate = "pair: %s; field lookup type", ) app.add_description_unit( directivename = "django-admin", Loading docs/ref/models/querysets.txt +44 −0 Original line number Diff line number Diff line Loading @@ -1191,6 +1191,8 @@ specified as keyword arguments to the ``QuerySet`` methods ``filter()``, For an introduction, see :ref:`field-lookups-intro`. .. fieldlookup:: exact exact ~~~~~ Loading Loading @@ -1222,6 +1224,8 @@ SQL equivalents:: information about this, see the :ref:`collation section <mysql-collation>` in the :ref:`databases <ref-databases>` documentation. .. fieldlookup:: iexact iexact ~~~~~~ Loading @@ -1245,6 +1249,8 @@ BLoG'``, etc. comparisons. SQLite does not do case-insensitive matching for Unicode strings. .. fieldlookup:: contains contains ~~~~~~~~ Loading @@ -1264,6 +1270,8 @@ Note this will match the headline ``'Today Lennon honored'`` but not SQLite doesn't support case-sensitive ``LIKE`` statements; ``contains`` acts like ``icontains`` for SQLite. .. fieldlookup:: icontains icontains ~~~~~~~~~ Loading @@ -1283,6 +1291,8 @@ SQL equivalent:: mind the :ref:`database note <sqlite-string-matching>` about string comparisons. .. fieldlookup:: in in ~~ Loading Loading @@ -1358,6 +1368,8 @@ extract two field values, where only one is expected:: the first query. Without it, a nested query would be executed, because :ref:`querysets-are-lazy`. .. fieldlookup:: gt gt ~~ Loading @@ -1371,21 +1383,29 @@ SQL equivalent:: SELECT ... WHERE id > 4; .. fieldlookup:: gte gte ~~~ Greater than or equal to. .. fieldlookup:: lt lt ~~ Less than. .. fieldlookup:: lte lte ~~~ Less than or equal to. .. fieldlookup:: startswith startswith ~~~~~~~~~~ Loading @@ -1402,6 +1422,8 @@ SQL equivalent:: SQLite doesn't support case-sensitive ``LIKE`` statements; ``startswith`` acts like ``istartswith`` for SQLite. .. fieldlookup:: istartswith istartswith ~~~~~~~~~~~ Loading @@ -1421,6 +1443,8 @@ SQL equivalent:: mind the :ref:`database note <sqlite-string-matching>` about string comparisons. .. fieldlookup:: endswith endswith ~~~~~~~~ Loading @@ -1437,6 +1461,8 @@ SQL equivalent:: SQLite doesn't support case-sensitive ``LIKE`` statements; ``endswith`` acts like ``iendswith`` for SQLite. .. fieldlookup:: iendswith iendswith ~~~~~~~~~ Loading @@ -1456,6 +1482,8 @@ SQL equivalent:: mind the :ref:`database note <sqlite-string-matching>` about string comparisons. .. fieldlookup:: range range ~~~~~ Loading @@ -1474,6 +1502,8 @@ SQL equivalent:: You can use ``range`` anywhere you can use ``BETWEEN`` in SQL -- for dates, numbers and even characters. .. fieldlookup:: year year ~~~~ Loading @@ -1489,6 +1519,8 @@ SQL equivalent:: (The exact SQL syntax varies for each database engine.) .. fieldlookup:: month month ~~~~~ Loading @@ -1505,6 +1537,8 @@ SQL equivalent:: (The exact SQL syntax varies for each database engine.) .. fieldlookup:: day day ~~~ Loading @@ -1523,6 +1557,8 @@ SQL equivalent:: Note this will match any record with a pub_date on the third day of the month, such as January 3, July 3, etc. .. fieldlookup:: week_day week_day ~~~~~~~~ Loading @@ -1544,6 +1580,8 @@ Note this will match any record with a pub_date that falls on a Monday (day 2 of the week), regardless of the month or year in which it occurs. Week days are indexed with day 1 being Sunday and day 7 being Saturday. .. fieldlookup:: isnull isnull ~~~~~~ Loading @@ -1558,6 +1596,8 @@ SQL equivalent:: SELECT ... WHERE pub_date IS NULL; .. fieldlookup:: search search ~~~~~~ Loading @@ -1577,6 +1617,8 @@ database to add the full-text index. By default Django uses BOOLEAN MODE for full text searches. `Please check MySQL documentation for additional details. <http://dev.mysql.com/doc/refman/5.1/en/fulltext-boolean.html>`_ .. fieldlookup:: regex regex ~~~~~ Loading Loading @@ -1606,6 +1648,8 @@ SQL equivalents:: Using raw strings (e.g., ``r'foo'`` instead of ``'foo'``) for passing in the regular expression syntax is recommended. .. fieldlookup:: iregex iregex ~~~~~~ Loading Loading
docs/_ext/djangodocs.py +1 −1 Original line number Diff line number Diff line Loading @@ -38,7 +38,7 @@ def setup(app): app.add_crossref_type( directivename = "fieldlookup", rolename = "lookup", indextemplate = "pair: %s, field lookup type", indextemplate = "pair: %s; field lookup type", ) app.add_description_unit( directivename = "django-admin", Loading
docs/ref/models/querysets.txt +44 −0 Original line number Diff line number Diff line Loading @@ -1191,6 +1191,8 @@ specified as keyword arguments to the ``QuerySet`` methods ``filter()``, For an introduction, see :ref:`field-lookups-intro`. .. fieldlookup:: exact exact ~~~~~ Loading Loading @@ -1222,6 +1224,8 @@ SQL equivalents:: information about this, see the :ref:`collation section <mysql-collation>` in the :ref:`databases <ref-databases>` documentation. .. fieldlookup:: iexact iexact ~~~~~~ Loading @@ -1245,6 +1249,8 @@ BLoG'``, etc. comparisons. SQLite does not do case-insensitive matching for Unicode strings. .. fieldlookup:: contains contains ~~~~~~~~ Loading @@ -1264,6 +1270,8 @@ Note this will match the headline ``'Today Lennon honored'`` but not SQLite doesn't support case-sensitive ``LIKE`` statements; ``contains`` acts like ``icontains`` for SQLite. .. fieldlookup:: icontains icontains ~~~~~~~~~ Loading @@ -1283,6 +1291,8 @@ SQL equivalent:: mind the :ref:`database note <sqlite-string-matching>` about string comparisons. .. fieldlookup:: in in ~~ Loading Loading @@ -1358,6 +1368,8 @@ extract two field values, where only one is expected:: the first query. Without it, a nested query would be executed, because :ref:`querysets-are-lazy`. .. fieldlookup:: gt gt ~~ Loading @@ -1371,21 +1383,29 @@ SQL equivalent:: SELECT ... WHERE id > 4; .. fieldlookup:: gte gte ~~~ Greater than or equal to. .. fieldlookup:: lt lt ~~ Less than. .. fieldlookup:: lte lte ~~~ Less than or equal to. .. fieldlookup:: startswith startswith ~~~~~~~~~~ Loading @@ -1402,6 +1422,8 @@ SQL equivalent:: SQLite doesn't support case-sensitive ``LIKE`` statements; ``startswith`` acts like ``istartswith`` for SQLite. .. fieldlookup:: istartswith istartswith ~~~~~~~~~~~ Loading @@ -1421,6 +1443,8 @@ SQL equivalent:: mind the :ref:`database note <sqlite-string-matching>` about string comparisons. .. fieldlookup:: endswith endswith ~~~~~~~~ Loading @@ -1437,6 +1461,8 @@ SQL equivalent:: SQLite doesn't support case-sensitive ``LIKE`` statements; ``endswith`` acts like ``iendswith`` for SQLite. .. fieldlookup:: iendswith iendswith ~~~~~~~~~ Loading @@ -1456,6 +1482,8 @@ SQL equivalent:: mind the :ref:`database note <sqlite-string-matching>` about string comparisons. .. fieldlookup:: range range ~~~~~ Loading @@ -1474,6 +1502,8 @@ SQL equivalent:: You can use ``range`` anywhere you can use ``BETWEEN`` in SQL -- for dates, numbers and even characters. .. fieldlookup:: year year ~~~~ Loading @@ -1489,6 +1519,8 @@ SQL equivalent:: (The exact SQL syntax varies for each database engine.) .. fieldlookup:: month month ~~~~~ Loading @@ -1505,6 +1537,8 @@ SQL equivalent:: (The exact SQL syntax varies for each database engine.) .. fieldlookup:: day day ~~~ Loading @@ -1523,6 +1557,8 @@ SQL equivalent:: Note this will match any record with a pub_date on the third day of the month, such as January 3, July 3, etc. .. fieldlookup:: week_day week_day ~~~~~~~~ Loading @@ -1544,6 +1580,8 @@ Note this will match any record with a pub_date that falls on a Monday (day 2 of the week), regardless of the month or year in which it occurs. Week days are indexed with day 1 being Sunday and day 7 being Saturday. .. fieldlookup:: isnull isnull ~~~~~~ Loading @@ -1558,6 +1596,8 @@ SQL equivalent:: SELECT ... WHERE pub_date IS NULL; .. fieldlookup:: search search ~~~~~~ Loading @@ -1577,6 +1617,8 @@ database to add the full-text index. By default Django uses BOOLEAN MODE for full text searches. `Please check MySQL documentation for additional details. <http://dev.mysql.com/doc/refman/5.1/en/fulltext-boolean.html>`_ .. fieldlookup:: regex regex ~~~~~ Loading Loading @@ -1606,6 +1648,8 @@ SQL equivalents:: Using raw strings (e.g., ``r'foo'`` instead of ``'foo'``) for passing in the regular expression syntax is recommended. .. fieldlookup:: iregex iregex ~~~~~~ Loading