From 738e6d986ba41ec5ef9ba5a600a333916f2e763d Mon Sep 17 00:00:00 2001 From: Brian Rosner Date: Mon, 28 Apr 2008 04:28:59 +0000 Subject: 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 --- django/db/models/sql/constants.py | 2 +- django/db/models/sql/subqueries.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'django/db/models/sql') 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] -- cgit v1.3