summaryrefslogtreecommitdiff
path: root/django/db/models/sql
diff options
context:
space:
mode:
authorBrian Rosner <brosner@gmail.com>2008-04-28 04:28:59 +0000
committerBrian Rosner <brosner@gmail.com>2008-04-28 04:28:59 +0000
commit738e6d986ba41ec5ef9ba5a600a333916f2e763d (patch)
tree7f6ab31d75a109d4267e22e30678f108bbbc1d71 /django/db/models/sql
parent678b9a6f5a0dfdf571e6dc66ade5521314047deb (diff)
newforms-admin: Merged from trunk up to [7491].
git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@7492 bcc190cf-cafb-0310-a4f2-bffc1f526a37
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]