Files
thrillwiki_django_no_react/config/settings/database.py
pacnpal ca7555c052 Configure PostGIS backend in correct database settings file
- Modified config/settings/database.py to force PostGIS engine
- This ensures spatial database operations work with PostgreSQL PostGIS
- The config-based settings structure was being used instead of thrillwiki/settings.py
2025-08-19 19:05:28 -04:00

31 lines
739 B
Python

"""
Database configuration for thrillwiki project.
"""
import environ
env = environ.Env()
# Database configuration
db_config = env.db()
# Force PostGIS backend for spatial data support
db_config['ENGINE'] = 'django.contrib.gis.db.backends.postgis'
DATABASES = {
'default': db_config,
}
# GeoDjango Settings - Environment specific
GDAL_LIBRARY_PATH = env('GDAL_LIBRARY_PATH', default=None)
GEOS_LIBRARY_PATH = env('GEOS_LIBRARY_PATH', default=None)
# Cache settings
CACHES = {
'default': env.cache('CACHE_URL', default='locmemcache://')
}
CACHE_MIDDLEWARE_SECONDS = env.int(
'CACHE_MIDDLEWARE_SECONDS', default=300) # 5 minutes
CACHE_MIDDLEWARE_KEY_PREFIX = env(
'CACHE_MIDDLEWARE_KEY_PREFIX', default='thrillwiki')