Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Clarified get_FOO_list part of docs/db-api.txt to specify keyword arg…

…uments are also accepted

git-svn-id: http://code.djangoproject.com/svn/django/trunk@781 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 16f9b08611ddc5512e16d9fcb6ce405f2962d319 1 parent 837afc5
Adrian Holovaty authored October 05, 2005

Showing 1 changed file with 5 additions and 0 deletions. Show diff stats Hide diff stats

  1. 5  docs/db-api.txt
5  docs/db-api.txt
@@ -572,6 +572,9 @@ object in the result list is "truncated" to the given ``type``.
572 572
     * ``"month"`` returns a list of all distinct year/month values for the field.
573 573
     * ``"day"`` returns a list of all distinct year/month/day values for the field.
574 574
 
  575
+Additional, optional keyword arguments, in the format described in
  576
+"Field lookups" above, are also accepted.
  577
+
575 578
 Here's an example, using the ``Poll`` model defined above::
576 579
 
577 580
     >>> from datetime import datetime
@@ -587,6 +590,8 @@ Here's an example, using the ``Poll`` model defined above::
587 590
     [datetime.datetime(2005, 2, 1), datetime.datetime(2005, 3, 1)]
588 591
     >>> polls.get_pub_date_list('day')
589 592
     [datetime.datetime(2005, 2, 20), datetime.datetime(2005, 3, 20)]
  593
+    >>> polls.get_pub_date_list('day', question__contains='name')
  594
+    [datetime.datetime(2005, 3, 20)]
590 595
 
591 596
 ``get_FOO_list()`` also accepts an optional keyword argument ``order``, which
592 597
 should be either ``"ASC"`` or ``"DESC"``. This specifies how to order the

0 notes on commit 16f9b08

Please sign in to comment.
Something went wrong with that request. Please try again.