                  'Cannot determine the SpatiaLite version for the "%s" '
                  'database (error was "%s").  Was the SpatiaLite initialization '
                  'SQL loaded on this database?') % (self.connection.settings_dict['NAME'], msg)
              six.reraise(ImproperlyConfigured, ImproperlyConfigured(new_msg), sys.exc_info()[2])
          if version < (3, 0, 0):
              raise ImproperlyConfigured('GeoDjango only supports SpatiaLite versions 3.0.0 and above.')
          return version
  
      def convert_extent(self, box, srid):
          """
          Convert the polygon data received from Spatialite to min/max values.
 
</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             type_col = 'type' if self.connection.ops.spatial_version < (4, 0, 0) else 'geometry_type'
            cursor.execute('SELECT coord_dimension, srid, %s '
 </s> add             cursor.execute('SELECT coord_dimension, srid, geometry_type ' </s> remove from django.contrib.gis.db.backends.spatialite.base import DatabaseWrapper
from django.db import connection, models
from django.db.backends.signals import connection_created
 </s> add from django.db import models </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 SQLite              GEOS, GDAL, PROJ.4, SpatiaLite  3.6.+               Requires SpatiaLite 3.0+, pysqlite2 2.5+
 </s> add SQLite              GEOS, GDAL, PROJ.4, SpatiaLite  3.6.+               Requires SpatiaLite 4.0+, pysqlite2 2.5+
        if version < (4, 0, 0):
            raise ImproperlyConfigured('GeoDjango only supports SpatiaLite versions 4.0.0 and above.')
                  'Cannot determine the SpatiaLite version for the "%s" '
                  'database (error was "%s").  Was the SpatiaLite initialization '
                  'SQL loaded on this database?') % (self.connection.settings_dict['NAME'], msg)
              six.reraise(ImproperlyConfigured, ImproperlyConfigured(new_msg), sys.exc_info()[2])
        if version < (4, 0, 0):
            raise ImproperlyConfigured('GeoDjango only supports SpatiaLite versions 4.0.0 and above.')
        if version < (4, 0, 0):
            raise ImproperlyConfigured('GeoDjango only supports SpatiaLite versions 4.0.0 and above.')
          return version
  
      def convert_extent(self, box, srid):
          """
          Convert the polygon data received from Spatialite to min/max values.
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/operations.py