add slim and full location list endpoint, geometry optional
This commit is contained in:
parent
8b47a89865
commit
87e5e56ea1
6 changed files with 148 additions and 31 deletions
|
@ -113,7 +113,8 @@ class Location(LocationSlug, AccessRestrictionMixin, TitledMixin, models.Model):
|
|||
result = super().serialize(detailed=detailed, **kwargs)
|
||||
if not detailed:
|
||||
fields = ('id', 'type', 'slug', 'title', 'subtitle', 'icon', 'point', 'bounds', 'grid_square',
|
||||
'locations', 'on_top_of', 'label_settings', 'label_override', 'add_search', 'dynamic')
|
||||
'locations', 'on_top_of', 'label_settings', 'label_override', 'add_search', 'dynamic',
|
||||
'locationtype', 'geometry')
|
||||
result = {name: result[name] for name in fields if name in result}
|
||||
return result
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue