when i upload django project to vercel it gives me this error
i installed postgis and gdal libraries
this is my models
class Center(models.Model):
name=models.CharField(max_length=64)
government=models.ForeignKey(Government,on_delete=models.CASCADE)
population=models.BigIntegerField(default=0)
location = LocationField(based_fields=['city'], zoom=7, null=True, blank=True)
def __str__(self):
return f"{self.name}"
this is view.py
@api_view(["get"])
def get_centers(request):
print("------------------centers---------------")
# serializer=CenterSerializer(Center.objects.all(),many=True).data
centers=Center.objects.annotate(
schools_count=Count('school'),
medical_facilities_count=Count('medical'),
infrastructures_count=Count('infrastructure'),
villages_count=Count('village'),
holly_places_count=Count("holly_places"),
public_safety_count=Count("public_safety"),
)
centers_data=[]
for center in centers:
government=GovernmentSerializer(center.government).data
centers_data.append({
"name":center.name,
"government":government,
"villages":center.villages_count,
"schools":center.schools_count,
"medical_facilities":center.medical_facilities_count,
"infrastructures:":center.infrastructures_count,
"public_safety":center.public_safety_count,
"population":center.population,
"location":{center.location.x,center.location.y},
})
return Response(centers_data)
this is settings.py
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'poorest_villages',
'rest_framework',
'rest_framework.authtoken',
'location_field.apps.DefaultConfig',
'django.contrib.gis',
'django.contrib.sites',
]
LOCATION_FIELD = {
'map.provider': 'openstreetmap',
'map.zoom': 15,
'search.provider': 'google',
'search.suffix': '',
# # Google
# ‘provider.google.api’: ‘//maps.google.com/maps/api/js?sensor=false’,
# ‘provider.google.api_key’: ‘<INSERT GOOGLE API KEY>’,
# ‘provider.google.api_libraries’: ‘’,
# ‘provider.google.map.type’: ‘ROADMAP’,
# OpenStreetMap
'provider.openstreetmap.max_zoom': 16,
}