      def get_geometry_type(self, table_name, geo_col):
          cursor = self.connection.cursor()
          try:
              # Querying the `geometry_columns` table to get additional metadata.
              type_col = 'type' if self.connection.ops.spatial_version < (4, 0, 0) else 'geometry_type'
              cursor.execute('SELECT coord_dimension, srid, %s '
                             'FROM geometry_columns '
                             'WHERE f_table_name=%%s AND f_geometry_column=%%s' % type_col,
                             (table_name, geo_col))
              row = cursor.fetchone()
              if not row:
 
</s> remove                            'WHERE f_table_name=%%s AND f_geometry_column=%%s' % type_col,
 </s> add                            'WHERE f_table_name=%s AND f_geometry_column=%s', </s> remove         if version < (3, 0, 0):
            raise ImproperlyConfigured('GeoDjango only supports SpatiaLite versions 3.0.0 and above.')
 </s> add         if version < (4, 0, 0):
            raise ImproperlyConfigured('GeoDjango only supports SpatiaLite versions 4.0.0 and above.') </s> remove                 # No `srtext` field in the `spatial_ref_sys` table in SpatiaLite < 4
                if not spatialite or connection.ops.spatial_version[0] >= 4:
                    self.assertTrue(srs.wkt.startswith(sd['srtext']))
 </s> add                 self.assertTrue(srs.wkt.startswith(sd['srtext'])) </s> remove         if self.spatial_version < (3, 1, 0):
            unsupported.add('SnapToGrid')
        if self.spatial_version < (4, 0, 0):
            unsupported.update({'Perimeter', 'Reverse'})
        elif not self.lwgeom_version():
 </s> add         if not self.lwgeom_version(): </s> remove             'Translate': 'ST_Translate' if self.spatial_version >= (3, 1, 0) else 'ShiftCoords',
 </s> add             'Translate': 'ST_Translate',
            cursor.execute('SELECT coord_dimension, srid, geometry_type '
      def get_geometry_type(self, table_name, geo_col):
          cursor = self.connection.cursor()
          try:
              # Querying the `geometry_columns` table to get additional metadata.
            cursor.execute('SELECT coord_dimension, srid, geometry_type '
            cursor.execute('SELECT coord_dimension, srid, geometry_type '
                             'FROM geometry_columns '
                             'WHERE f_table_name=%%s AND f_geometry_column=%%s' % type_col,
                             (table_name, geo_col))
              row = cursor.fetchone()
              if not row:
keep keep keep keep replace replace keep keep keep keep keep
 Fixed #25645 -- Dropped support for SpatiaLite < 4.0. 
django/contrib/gis/db/backends/spatialite/introspection.py