summaryrefslogtreecommitdiff
path: root/django/db/models/sql
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2014-06-17 11:57:16 -0400
committerTim Graham <timograham@gmail.com>2014-06-17 11:57:16 -0400
commit95cc0e15b45dd0986bdfd9fa3fedee4550c744c8 (patch)
treeb6ef1a366cb8c4c76bb16a264da0b938d51a61d6 /django/db/models/sql
parent61d7ae31cf286277ddefaf8006597be40388d2ee (diff)
Fixed #22819 -- Renamed output_type -> output_field in query expression API.
Thanks jorgecarleitao for the suggestion.
Diffstat (limited to 'django/db/models/sql')
-rw-r--r--django/db/models/sql/aggregates.py2
-rw-r--r--django/db/models/sql/datastructures.py6
-rw-r--r--django/db/models/sql/query.py4
3 files changed, 6 insertions, 6 deletions
diff --git a/django/db/models/sql/aggregates.py b/django/db/models/sql/aggregates.py
index ce2968c445..8274d43621 100644
--- a/django/db/models/sql/aggregates.py
+++ b/django/db/models/sql/aggregates.py
@@ -103,7 +103,7 @@ class Aggregate(RegisterLookupMixin):
return []
@property
- def output_type(self):
+ def output_field(self):
return self.field
diff --git a/django/db/models/sql/datastructures.py b/django/db/models/sql/datastructures.py
index f47e25208c..f9c9c259de 100644
--- a/django/db/models/sql/datastructures.py
+++ b/django/db/models/sql/datastructures.py
@@ -12,7 +12,7 @@ class Col(object):
return "%s.%s" % (qn(self.alias), qn(self.target.column)), []
@property
- def output_type(self):
+ def output_field(self):
return self.source
def relabeled_clone(self, relabels):
@@ -22,10 +22,10 @@ class Col(object):
return [(self.alias, self.target.column)]
def get_lookup(self, name):
- return self.output_type.get_lookup(name)
+ return self.output_field.get_lookup(name)
def get_transform(self, name):
- return self.output_type.get_transform(name)
+ return self.output_field.get_transform(name)
def prepare(self):
return self
diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py
index ff86e8b45b..cb2bb2f1b8 100644
--- a/django/db/models/sql/query.py
+++ b/django/db/models/sql/query.py
@@ -1102,7 +1102,7 @@ class Query(object):
raise FieldError(
"Unsupported lookup '%s' for %s or join on the field not "
"permitted." %
- (lookup, lhs.output_type.__class__.__name__))
+ (lookup, lhs.output_field.__class__.__name__))
lookups = lookups[1:]
def build_filter(self, filter_expr, branch_negated=False, current_negated=False,
@@ -1190,7 +1190,7 @@ class Query(object):
raise FieldError(
"Join on field '%s' not permitted. Did you "
"misspell '%s' for the lookup type?" %
- (col.output_type.name, lookups[0]))
+ (col.output_field.name, lookups[0]))
if len(lookups) > 1:
raise FieldError("Nested lookup '%s' not supported." %
LOOKUP_SEP.join(lookups))