I'm trying to serialize data in the geojson format however whenever I use
json = serialize("geojson", coordinate.objects.all())
response = HttpResponse(json)
return response
django gives me
SerializerDoesNotExist at /getmarkers/ 'geojson'
this works fine
json = serialize("json", coordinate.objects.all())
surely anyone else who has tried using the geojson serializer has ran into the same issue. I've installed the GDAL library as told to do so in the docs. Any ideas? Can't seem to really find anything in the docs about what modules must be imported I've tried
from django.contrib.gis import gdal
Does not throw an error but also does not fix the issue I'm using Django 1.8
You need to include the geojson serializer in settings.py
SERIALIZATION_MODULES = {
"geojson": "django.contrib.gis.serializers.geojson",
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With