The data was imported into Django (or rather PostGIS) from a shapefile using LayerMapping. It seems well-formed since it is viewable using the admin interface. There were issues with installing the right version of GDAL because OSGeo4W installs a newer version that GeoDjango doesn't recognize. This could be related, but it is hard to say. The error message is not very helpful.
GDAL seems to work otherwise since the import worked.
I've tried setting the GDAL_DATA variable to C:\Program Files\GDAL\gdal-data
which should be correct but that doesn't seem to change anything.
I am using this recommended fix already, with the GDAL additions at the end:
if os.name == 'nt':
import platform
OSGEO4W = r"C:\OSGeo4W"
if '64' in platform.architecture()[0]:
OSGEO4W += "64"
assert os.path.isdir(OSGEO4W), "Directory does not exist: " + OSGEO4W
os.environ['OSGEO4W_ROOT'] = OSGEO4W
# os.environ['GDAL_DATA'] = OSGEO4W + r"\share\gdal"
os.environ['PROJ_LIB'] = OSGEO4W + r"\share\proj"
os.environ['PATH'] = OSGEO4W + r"\bin;" + os.environ['PATH']
GDAL_DATA = r'C:\Program Files\GDAL\gdal-data'
GDAL_LIBRARY_PATH = r'C:\Program Files\GDAL\gdal203.dll'