Splits Django configuration into included files and optional components with wildcard paths and shared local context.
Overview
Django Split Settings lets you replace a monolithic settings.py with an ordered list of smaller files, typically organized as a settings package with components such as base and database modules. The include helper loads each file in sequence, and optional() can skip missing paths such as local overrides.
Each included file shares the same local context, so later files can read or change values defined earlier. Wildcards in paths let you pull in every matching module under a directory, with order determined by glob rather than alphabetical sorting. The package has no dependencies beyond Django and documents supported Django release lines.
Documentation explains adjusting BASE_DIR when settings become a package instead of a single file, so static and media paths still resolve to the project root. An API covers include and optional helpers for assembling environment-specific stacks.
The goal is easier overrides per environment and clearer separation of concerns without abandoning plain Python settings files.
Key features
- Include ordered settings components
- Optional missing settings files
- Wildcard glob in settings paths
- Shared context across included files
- No extra package dependencies
- Settings package instead of one file
- Local override patterns
- Documented BASE_DIR adjustment
Use cases
- Splitting large Django settings modules
- Optional local settings overlays
- Environment-specific Django configuration
- Organizing settings by concern