summaryrefslogtreecommitdiff
path: root/django/db/models/sql
diff options
context:
space:
mode:
Diffstat (limited to 'django/db/models/sql')
-rw-r--r--django/db/models/sql/constants.py2
-rw-r--r--django/db/models/sql/subqueries.py3
2 files changed, 3 insertions, 2 deletions
diff --git a/django/db/models/sql/constants.py b/django/db/models/sql/constants.py
index 3075817385..129a592b31 100644
--- a/django/db/models/sql/constants.py
+++ b/django/db/models/sql/constants.py
@@ -28,7 +28,7 @@ NULLABLE = 6
MULTI = 'multi'
SINGLE = 'single'
-ORDER_PATTERN = re.compile(r'\?|[-+]?\w+$')
+ORDER_PATTERN = re.compile(r'\?|[-+]?[.\w]+$')
ORDER_DIR = {
'ASC': ('ASC', 'DESC'),
'DESC': ('DESC', 'ASC')}
diff --git a/django/db/models/sql/subqueries.py b/django/db/models/sql/subqueries.py
index 382e6e94ff..1f9a13ecdc 100644
--- a/django/db/models/sql/subqueries.py
+++ b/django/db/models/sql/subqueries.py
@@ -95,7 +95,7 @@ class UpdateQuery(Query):
def _setup_query(self):
"""
- Runs on initialisation and after cloning. Any attributes that would
+ Runs on initialization and after cloning. Any attributes that would
normally be set in __init__ should go in here, instead, so that they
are also set up after a clone() call.
"""
@@ -349,6 +349,7 @@ class DateQuery(Query):
self.connection.ops.date_trunc_sql)
self.select = [select]
self.select_fields = [None]
+ self.select_related = False # See #7097.
self.distinct = True
self.order_by = order == 'ASC' and [1] or [-1]