mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-20 03: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
|
||||
|
||||
# Parse database URL but use PostGIS engine
|
||||
# Parse database URL but force PostGIS engine
|
||||
db_config = dj_database_url.config(
|
||||
default="[DATABASE-URL-REMOVED]
|
||||
conn_max_age=600,
|
||||
conn_health_checks=True,
|
||||
)
|
||||
|
||||
# Override engine to use PostGIS
|
||||
db_config["ENGINE"] = "django.contrib.gis.db.backends.postgis"
|
||||
|
||||
# Force PostGIS engine - override any parsed engine
|
||||
DATABASES = {
|
||||
"default": db_config
|
||||
"default": {
|
||||
**db_config,
|
||||
"ENGINE": "django.contrib.gis.db.backends.postgis",
|
||||
}
|
||||
}
|
||||
|
||||
# Cache settings
|
||||
|
||||
Reference in New Issue
Block a user