new REST API
This commit is contained in:
parent
ac29041a3c
commit
6bbac4a7ba
12 changed files with 265 additions and 205 deletions
|
@ -30,6 +30,18 @@ class GeometryMixin(EditorFormMixin):
|
|||
('geometry', format_geojson(mapping(self.geometry), round=False)),
|
||||
))
|
||||
|
||||
def serialize(self, geometry=True, **kwargs):
|
||||
result = super().serialize(geometry=geometry, **kwargs)
|
||||
if geometry:
|
||||
result.move_to_end('geometry')
|
||||
return result
|
||||
|
||||
def _serialize(self, geometry=True, **kwargs):
|
||||
result = super()._serialize(**kwargs)
|
||||
if geometry:
|
||||
result['geometry'] = format_geojson(mapping(self.geometry), round=False)
|
||||
return result
|
||||
|
||||
def get_shadow_geojson(self):
|
||||
pass
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue