wip: do not expose UMAP_SCHEMA for now

This commit is contained in:
Yohan Boniface 2024-03-04 11:10:45 +01:00
parent 24e46847b7
commit e7bd94a099
3 changed files with 7 additions and 11 deletions

View file

@ -218,7 +218,7 @@ class Map(NamedModel):
"umap_id": self.pk, "umap_id": self.pk,
"onLoadPanel": "none", "onLoadPanel": "none",
"captionBar": False, "captionBar": False,
"schema": self.schema, "schema": self.extra_schema,
"slideshow": {}, "slideshow": {},
} }
) )
@ -330,15 +330,12 @@ class Map(NamedModel):
return new return new
@classproperty @classproperty
def schema(self): def extra_schema(self):
schema = settings.UMAP_SCHEMA return {
schema.setdefault( "iconUrl": {
"iconUrl",
{
"default": "%sumap/img/marker.svg" % settings.STATIC_URL, "default": "%sumap/img/marker.svg" % settings.STATIC_URL,
}, }
) }
return schema
class Pictogram(NamedModel): class Pictogram(NamedModel):

View file

@ -256,7 +256,6 @@ UMAP_DEFAULT_SHARE_STATUS = None
UMAP_DEFAULT_EDIT_STATUS = None UMAP_DEFAULT_EDIT_STATUS = None
UMAP_DEFAULT_FEATURES_HAVE_OWNERS = False UMAP_DEFAULT_FEATURES_HAVE_OWNERS = False
UMAP_HOME_FEED = "latest" UMAP_HOME_FEED = "latest"
UMAP_SCHEMA = {}
UMAP_READONLY = env("UMAP_READONLY", default=False) UMAP_READONLY = env("UMAP_READONLY", default=False)
UMAP_GZIP = True UMAP_GZIP = True

View file

@ -488,7 +488,7 @@ class MapDetailMixin:
"urls": _urls_for_js(), "urls": _urls_for_js(),
"tilelayers": TileLayer.get_list(), "tilelayers": TileLayer.get_list(),
"editMode": self.edit_mode, "editMode": self.edit_mode,
"schema": Map.schema, "schema": Map.extra_schema,
"umap_id": self.get_umap_id(), "umap_id": self.get_umap_id(),
"starred": self.is_starred(), "starred": self.is_starred(),
"licences": dict((l.name, l.json) for l in Licence.objects.all()), "licences": dict((l.name, l.json) for l in Licence.objects.all()),