From 833941a9e683cb0e9086d3b518393684107b2fc5 Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Tue, 19 Nov 2024 18:44:35 +0100 Subject: [PATCH] chore: set an explicit db engine (postgis) While working on a helm chart, we do not control the creation of the db URL, which use "postgres://" instead of "postgis://", so Django does not set the correct engine. --- umap/settings/base.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/umap/settings/base.py b/umap/settings/base.py index c00ef253..3de78ce6 100644 --- a/umap/settings/base.py +++ b/umap/settings/base.py @@ -260,7 +260,12 @@ UMAP_MAPS_PER_PAGE_OWNER = 10 UMAP_SEARCH_CONFIGURATION = "simple" UMAP_HELP_URL = "https://wiki.openstreetmap.org/wiki/UMap#Feedback_and_help" USER_MAPS_URL = "user_maps" -DATABASES = {"default": env.db(default="postgis://localhost:5432/umap")} +DATABASES = { + "default": env.db( + default="postgis://localhost:5432/umap", + engine="django.contrib.gis.db.backends.postgis", + ) +} UMAP_DEFAULT_SHARE_STATUS = None UMAP_DEFAULT_EDIT_STATUS = None UMAP_DEFAULT_FEATURES_HAVE_OWNERS = False