Configuration¶
Configuration is environment-driven (.env, .env.example).
Core Django Settings¶
SECRET_KEYDEBUGALLOWED_HOSTSCSRF_TRUSTED_ORIGINS
Database Settings¶
DATABASE_URLTEST_DATABASE_URLTEST_USE_DATABASE_URLTEST_REUSE_EXISTING_DB
Behavior:
- Postgres/PostGIS URL selects GeoDjango PostGIS backend
- Empty DB URL falls back to SpatiaLite
TEST_DATABASE_URLuses default Django test DB create/drop flow- Set
TEST_REUSE_EXISTING_DB=Trueonly for legacy in-place reuse mode - PostGIS test create/drop flow may require superuser privileges to run
CREATE EXTENSION postgisin fresh test databases
Map Settings¶
DEFAULT_MAP_CENTER_LAT,DEFAULT_MAP_CENTER_LNGDEFAULT_MAP_ZOOM,MIN_MAP_ZOOMUTM_EPSGDEFAULT_TILE_PROVIDEROSM_TILE_URL,SATELLITE_TILE_URL
Raster Overlay Settings¶
RASTER_TILES_ROOT: filesystem root where pre-generated raster XYZ tiles are storedRASTER_TILES_URL: URL prefix used by the raster tile-serving endpointRASTER_QUERY_ROOT: filesystem root where queryable raster sources are stored for point sampling
Grid Summary Settings¶
GRID_SUMMARY_COARSE_ZOOM_MAXGRID_SUMMARY_FINE_ZOOM_MAXGRID_SUMMARY_COARSE_CELL_METERSGRID_SUMMARY_FINE_CELL_METERSGRID_SUMMARY_MAX_INDIVIDUAL_PARCELSCLUSTERING_CACHE_TIMEOUT
Notes:
- These values can be overridden at runtime in Django admin via
Parcels -> Parcel Map Settings. - If no
Parcel Map Settingsrow exists, environment values are used as fallback.
File Upload Limits¶
FILE_UPLOAD_MAX_MEMORY_SIZEDATA_UPLOAD_MAX_MEMORY_SIZE
Security/Production Settings¶
Applied when DEBUG=False, including:
- SSL redirect and forwarded host settings
- secure session/csrf cookies
- HSTS
- hardened static storage (
CompressedManifestStaticFilesStorage)