summaryrefslogtreecommitdiff
path: root/django/db/models/sql/where.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/db/models/sql/where.py')
-rw-r--r--django/db/models/sql/where.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/django/db/models/sql/where.py b/django/db/models/sql/where.py
index 8724906a8c..d97112e9f3 100644
--- a/django/db/models/sql/where.py
+++ b/django/db/models/sql/where.py
@@ -174,9 +174,9 @@ class WhereNode(tree.Node):
params)
elif lookup_type in ('range', 'year'):
return ('%s BETWEEN %%s and %%s' % field_sql, params)
- elif lookup_type in ('month', 'day'):
- return ('%s = %%s' % connection.ops.date_extract_sql(lookup_type,
- field_sql), params)
+ elif lookup_type in ('month', 'day', 'week_day'):
+ return ('%s = %%s' % connection.ops.date_extract_sql(lookup_type, field_sql),
+ params)
elif lookup_type == 'isnull':
return ('%s IS %sNULL' % (field_sql,
(not value_annot and 'NOT ' or '')), ())