diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2006-01-20 20:23:57 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2006-01-20 20:23:57 +0000 |
| commit | 5355ec999292b17fc2788ddb3603d0d8a71a6a1e (patch) | |
| tree | 66ba0d3ca68a856f3cee3ac97fb744e808e8e59c /docs/db-api.txt | |
| parent | 2483ed749bc0969b38ddf27a84c01ad6af628647 (diff) | |
Added section to docs/db-api.txt about ordering by fields in other tables
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2076 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/db-api.txt')
| -rw-r--r-- | docs/db-api.txt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/docs/db-api.txt b/docs/db-api.txt index b00bd52b88..f1dea93a14 100644 --- a/docs/db-api.txt +++ b/docs/db-api.txt @@ -273,6 +273,11 @@ so:: polls.get_list(order_by=['?']) +To order by a field in a different table, add the other table's name and a dot, +like so:: + + choices.get_list(order_by=('polls.pub_date', 'choice')) + There's no way to specify whether ordering should be case sensitive. With respect to case-sensitivity, Django will order results however your database backend normally orders them. |
