optimize traffic for editor geometries / cache objects locally

This commit is contained in:
Laura Klünder 2019-12-10 00:11:59 +01:00
parent 7062a6c446
commit b3f307b9a6
7 changed files with 88 additions and 11 deletions

View file

@ -52,6 +52,9 @@ class GeometryMixin(SerializableMixin):
result['bounds'] = True
return result
def get_geojson_key(self):
return (self.__class__.__name__.lower(), self.id)
def to_geojson(self, instance=None) -> dict:
result = {
'type': 'Feature',