summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2010-05-09 05:13:45 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2010-05-09 05:13:45 +0000
commitd52996311317592e72b1bc72cb125a5f64e5fee0 (patch)
tree72543c104406365d026f9575d225cb220d6d3aed
parent95693cc6dd267bfccfdcccbd29c09516f7b049db (diff)
[1.1.X] Fixed #13282 -- Clarified documentation around week_day filtering in querysets. Thanks to wangchun, Ramiro Morales and timo.
Backport of r13155 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.1.X@13159 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--docs/ref/models/querysets.txt10
1 files changed, 5 insertions, 5 deletions
diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt
index 698b1f2388..7c6c0c17d1 100644
--- a/docs/ref/models/querysets.txt
+++ b/docs/ref/models/querysets.txt
@@ -1518,15 +1518,15 @@ week_day
For date/datetime fields, a 'day of the week' match.
+Takes an integer value representing the day of week from 1 (Sunday) to 7
+(Saturday).
+
Example::
Entry.objects.filter(pub_date__week_day=2)
-SQL equivalent::
-
- SELECT ... WHERE EXTRACT('dow' FROM pub_date) = '2';
-
-(The exact SQL syntax varies for each database engine.)
+(No equivalent SQL code fragment is included for this lookup because
+implementation of the relevant query varies among different database engines.)
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