Skip to content

Latest commit

 

History

History
37 lines (24 loc) · 1.22 KB

SETTINGS.md

File metadata and controls

37 lines (24 loc) · 1.22 KB

Settings

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.

Environment variables

DJANGO_SETTINGS_MODULE

Specifies which settings file to use:

  • config.settings.local
  • config.settings.heroku

DEBUG

Specifies whether Django's debug mode is turned on/off:

  • on
  • off

Never deploy a site into production with DEBUG turned on.

DATABASE_URL

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.

SECRET_KEY

Specifies Django's secret key:

  • Any string will do for local development
  • For a production environment you can generate a key here