mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-20 09:31:09 -05:00
Fix PostGIS backend configuration
- Properly override database engine to use PostGIS after dj_database_url parsing - Ensures spatial database operations work correctly with PostgreSQL PostGIS
This commit is contained in:
@@ -93,16 +93,19 @@ WSGI_APPLICATION = "thrillwiki.wsgi.application"
|
||||
|
||||
# Database
|
||||
|
||||
DATABASES = {
|
||||
"default": dj_database_url.config(
|
||||
# Parse database URL but use PostGIS engine
|
||||
db_config = dj_database_url.config(
|
||||
default="[DATABASE-URL-REMOVED]
|
||||
conn_max_age=600,
|
||||
conn_health_checks=True,
|
||||
)
|
||||
}
|
||||
)
|
||||
|
||||
# Ensure PostGIS backend is used
|
||||
DATABASES["default"]["ENGINE"] = "django.contrib.gis.db.backends.postgis"
|
||||
# Override engine to use PostGIS
|
||||
db_config["ENGINE"] = "django.contrib.gis.db.backends.postgis"
|
||||
|
||||
DATABASES = {
|
||||
"default": db_config
|
||||
}
|
||||
|
||||
# Cache settings
|
||||
CACHES = {
|
||||
|
||||
Reference in New Issue
Block a user