diff --git a/django/contrib/gis/db/backends/postgis/schema.py b/django/contrib/gis/db/backends/postgis/schema.py index 46e438acaa..181826789b 100644 --- a/django/contrib/gis/db/backends/postgis/schema.py +++ b/django/contrib/gis/db/backends/postgis/schema.py @@ -1,6 +1,4 @@ -from django.conf import settings from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor -from django.utils.functional import cached_property class PostGISSchemaEditor(DatabaseSchemaEditor): diff --git a/django/contrib/gis/db/models/fields.py b/django/contrib/gis/db/models/fields.py index b5cdc72c29..734f805c8d 100644 --- a/django/contrib/gis/db/models/fields.py +++ b/django/contrib/gis/db/models/fields.py @@ -112,9 +112,9 @@ class GeometryField(Field): kwargs['srid'] = self.srid if self.dim != 2: kwargs['dim'] = self.dim - if self.spatial_index != True: + if self.spatial_index is not True: kwargs['spatial_index'] = self.spatial_index - if self.geography != False: + if self.geography is not False: kwargs['geography'] = self.geography return name, path, args, kwargs