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

Replaced @cached_property with class attributes where possible.

This commit is contained in:
Sergey Fedoseev
2017-09-06 09:29:11 +05:00
committed by Tim Graham
parent 690fc30d44
commit 34f27f910b
3 changed files with 17 additions and 34 deletions

View File

@@ -134,10 +134,7 @@ class PostGISOperations(BaseSpatialOperations, DatabaseOperations):
unsupported_functions = set()
@cached_property
def select(self):
return '%s::bytea'
select = '%s::bytea'
select_extent = None
def __init__(self, connection):

View File

@@ -68,17 +68,15 @@ class SpatiaLiteOperations(BaseSpatialOperations, DatabaseOperations):
def select(self):
return 'CAST (AsEWKB(%s) AS BLOB)' if self.spatial_version >= (4, 3, 0) else 'AsText(%s)'
@cached_property
def function_names(self):
return {
'Length': 'ST_Length',
'LineLocatePoint': 'ST_Line_Locate_Point',
'NumPoints': 'ST_NPoints',
'Reverse': 'ST_Reverse',
'Scale': 'ScaleCoords',
'Translate': 'ST_Translate',
'Union': 'ST_Union',
}
function_names = {
'Length': 'ST_Length',
'LineLocatePoint': 'ST_Line_Locate_Point',
'NumPoints': 'ST_NPoints',
'Reverse': 'ST_Reverse',
'Scale': 'ScaleCoords',
'Translate': 'ST_Translate',
'Union': 'ST_Union',
}
@cached_property
def unsupported_functions(self):