g214/graphics/geojson_serializer.py

9 lines
269 B
Python
Raw Normal View History

2018-08-20 08:21:25 +00:00
from django.contrib.gis.serializers.geojson import Serializer as GeoJSONSerializer
class Serializer(GeoJSONSerializer):
def get_dump_object(self, obj):
data = super(Serializer, self).get_dump_object(obj)
data.update(id=obj.pk)
return data