[Answer]-How to use Django JSON and GeoJSON Serializer?

1👍

print(data) won’t work. You have to do something like:

return HttpResponse(data)

Then visit the URL of that view and you’ll see the result.

Update

MultiValueDictKeyError occurs if the key that you’re trying to access is not in request.GET or request.POST.

To prevent this error, make sure your GET request has zoom key. For that you will need to write the URL in addressbar something like this:

/getmarkers/?zoom=val&formlat=val&somekey=val

Replace val with the value for that key.

👤xyres

Leave a comment