      ref_sys_name = models.CharField(max_length=256)
      proj4text = models.CharField(max_length=2048)
  
      @property
      def wkt(self):
          if hasattr(self, 'srtext'):
              return self.srtext
          from django.contrib.gis.gdal import SpatialReference
 
</s> remove from django.db import connection
 </s> add  </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                 # 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():
    srtext = models.CharField(max_length=2048)
      ref_sys_name = models.CharField(max_length=256)
      proj4text = models.CharField(max_length=2048)
    srtext = models.CharField(max_length=2048)
  
      @property
      def wkt(self):
          if hasattr(self, 'srtext'):
              return self.srtext
          from django.contrib.gis.gdal import SpatialReference
keep add keep keep keep keep keep keep
 Fixed #25645 -- Dropped support for SpatiaLite < 4.0. 
django/contrib/gis/db/backends/spatialite/models.py