mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-20 06:31:09 -05:00
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
This commit is contained in:
@@ -7,8 +7,12 @@ 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': env.db(),
|
||||
'default': db_config,
|
||||
}
|
||||
|
||||
# GeoDjango Settings - Environment specific
|
||||
@@ -20,6 +24,7 @@ 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')
|
||||
|
||||
CACHE_MIDDLEWARE_SECONDS = env.int(
|
||||
'CACHE_MIDDLEWARE_SECONDS', default=300) # 5 minutes
|
||||
CACHE_MIDDLEWARE_KEY_PREFIX = env(
|
||||
'CACHE_MIDDLEWARE_KEY_PREFIX', default='thrillwiki')
|
||||
|
||||
Reference in New Issue
Block a user