wip: do not expose UMAP_SCHEMA for now
This commit is contained in:
parent
24e46847b7
commit
e7bd94a099
3 changed files with 7 additions and 11 deletions
|
@ -218,7 +218,7 @@ class Map(NamedModel):
|
|||
"umap_id": self.pk,
|
||||
"onLoadPanel": "none",
|
||||
"captionBar": False,
|
||||
"schema": self.schema,
|
||||
"schema": self.extra_schema,
|
||||
"slideshow": {},
|
||||
}
|
||||
)
|
||||
|
@ -330,15 +330,12 @@ class Map(NamedModel):
|
|||
return new
|
||||
|
||||
@classproperty
|
||||
def schema(self):
|
||||
schema = settings.UMAP_SCHEMA
|
||||
schema.setdefault(
|
||||
"iconUrl",
|
||||
{
|
||||
def extra_schema(self):
|
||||
return {
|
||||
"iconUrl": {
|
||||
"default": "%sumap/img/marker.svg" % settings.STATIC_URL,
|
||||
},
|
||||
)
|
||||
return schema
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class Pictogram(NamedModel):
|
||||
|
|
|
@ -256,7 +256,6 @@ UMAP_DEFAULT_SHARE_STATUS = None
|
|||
UMAP_DEFAULT_EDIT_STATUS = None
|
||||
UMAP_DEFAULT_FEATURES_HAVE_OWNERS = False
|
||||
UMAP_HOME_FEED = "latest"
|
||||
UMAP_SCHEMA = {}
|
||||
|
||||
UMAP_READONLY = env("UMAP_READONLY", default=False)
|
||||
UMAP_GZIP = True
|
||||
|
|
|
@ -488,7 +488,7 @@ class MapDetailMixin:
|
|||
"urls": _urls_for_js(),
|
||||
"tilelayers": TileLayer.get_list(),
|
||||
"editMode": self.edit_mode,
|
||||
"schema": Map.schema,
|
||||
"schema": Map.extra_schema,
|
||||
"umap_id": self.get_umap_id(),
|
||||
"starred": self.is_starred(),
|
||||
"licences": dict((l.name, l.json) for l in Licence.objects.all()),
|
||||
|
|
Loading…
Reference in a new issue