mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-20 12:51:09 -05:00
Force PostGIS backend using dictionary spread syntax
- Use **db_config spread syntax to ensure PostGIS engine override takes effect - This prevents dj_database_url from overriding the PostGIS backend setting
This commit is contained in:
@@ -93,18 +93,19 @@ WSGI_APPLICATION = "thrillwiki.wsgi.application"
|
|||||||
|
|
||||||
# Database
|
# Database
|
||||||
|
|
||||||
# Parse database URL but use PostGIS engine
|
# Parse database URL but force PostGIS engine
|
||||||
db_config = dj_database_url.config(
|
db_config = dj_database_url.config(
|
||||||
default="[DATABASE-URL-REMOVED]
|
default="[DATABASE-URL-REMOVED]
|
||||||
conn_max_age=600,
|
conn_max_age=600,
|
||||||
conn_health_checks=True,
|
conn_health_checks=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
# Override engine to use PostGIS
|
# Force PostGIS engine - override any parsed engine
|
||||||
db_config["ENGINE"] = "django.contrib.gis.db.backends.postgis"
|
|
||||||
|
|
||||||
DATABASES = {
|
DATABASES = {
|
||||||
"default": db_config
|
"default": {
|
||||||
|
**db_config,
|
||||||
|
"ENGINE": "django.contrib.gis.db.backends.postgis",
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Cache settings
|
# Cache settings
|
||||||
|
|||||||
Reference in New Issue
Block a user