Inpired by 12factor, this project contains separate settings files for different environments.
The files are located in the config.settings
module.
Additionally, in order to run the project, some environment variables need to be set.
Specifies which settings file to use:
config.settings.local
config.settings.heroku
Specifies whether Django's debug mode is turned on/off:
on
off
Never deploy a site into production with DEBUG turned on
.
Specifies which database to connect to:
postgres://USER:PASSWORD@HOST:PORT/NAME
sqlite:///PATH
Using django-environ, the url is parsed to a specific database configuration. Supporting databases can be found here.
Specifies Django's secret key:
- Any string will do for local development
- For a production environment you can generate a key here