summaryrefslogtreecommitdiff
path: root/docs/db-api.txt
diff options
context:
space:
mode:
Diffstat (limited to 'docs/db-api.txt')
-rw-r--r--docs/db-api.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/docs/db-api.txt b/docs/db-api.txt
index 1fe77ebfb0..4b906bb87d 100644
--- a/docs/db-api.txt
+++ b/docs/db-api.txt
@@ -308,6 +308,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.