Django standardsettings encapsulates using dotenv and getenv to produce a "standard" (opinionated) set of settings for the basic configuration needed in most projects.
import standardsettings; standardsettings.apply_settings(__name__)
It defines what things should be exposed to be configurable (e.g
over environment variables and simplifies them (e.g setting
ENABLE_DEBUG_TOOLBAR=True will add it to
INSTALLED_APPS and to
It also does some autosetup for specific deployment environments based on a single environment variable.
AUTOSETUP="local" will use our opinionated defaults for local development.
AUTOSETUP="divio-nine-cloud" will configure all the basic settings for deployment on our server at nine.
Of course you can still override all these settings by defining variables in the corresponding
Deployment specific things are:
Standardsettings also adds some other opinionated settings that should be the same over most projects: