mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-20 13:11:08 -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
|
# Database
|
||||||
|
|
||||||
DATABASES = {
|
# Parse database URL but use PostGIS engine
|
||||||
"default": 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,
|
||||||
)
|
)
|
||||||
}
|
|
||||||
|
|
||||||
# Ensure PostGIS backend is used
|
# Override engine to use PostGIS
|
||||||
DATABASES["default"]["ENGINE"] = "django.contrib.gis.db.backends.postgis"
|
db_config["ENGINE"] = "django.contrib.gis.db.backends.postgis"
|
||||||
|
|
||||||
|
DATABASES = {
|
||||||
|
"default": db_config
|
||||||
|
}
|
||||||
|
|
||||||
# Cache settings
|
# Cache settings
|
||||||
CACHES = {
|
CACHES = {
|
||||||
|
|||||||
Reference in New Issue
Block a user