1
0
mirror of https://github.com/django/django.git synced 2025-10-25 06:36:07 +00:00

[1.7.x] Fixed #22819 -- Renamed output_type -> output_field in query expression API.

Thanks jorgecarleitao for the suggestion.

Backport of 95cc0e15b4 from master
This commit is contained in:
Tim Graham
2014-06-17 11:57:16 -04:00
parent 57a770b8e5
commit aa10f57d94
7 changed files with 29 additions and 29 deletions

View File

@@ -46,7 +46,7 @@ class YearTransform(models.Transform):
return connection.ops.date_extract_sql('year', lhs_sql), params
@property
def output_type(self):
def output_field(self):
return models.IntegerField()
@@ -98,7 +98,7 @@ class SQLFunc(models.Lookup):
return '%s()', [self.name]
@property
def output_type(self):
def output_field(self):
return CustomField()
@@ -342,7 +342,7 @@ class TrackCallsYearTransform(YearTransform):
return connection.ops.date_extract_sql('year', lhs_sql), params
@property
def output_type(self):
def output_field(self):
return models.IntegerField()
def get_lookup(self, lookup_name):