Environment Variables

This page contains a complete list of the available environment variables, including their defaults and recommended settings for both development and production.

List of Environment Variables

This is the current complete list of available environment variables. As more environment variables are added to to project, they will be added to this list.

Django

  • DJANGO_DEBUG

    • Default: False

    • Set DJANGO_DEBUG=1 to set this variable to True.

    • Used to set the variable DEBUG. Sets INTERNAL_IPS to ["127.0.0.1", "localhost"] when debugging is enabled and to [] when disabled. Also enables or disables Django debug toolbar.

  • DJANGO_SECRET_KEY

    Important

    Must be defined as environment variable. No default is provided.

    • Used to set the variable SECRET_KEY. For development, set this string to any desired. For production, the secret key must not have the prefix "django-insecure-", the minimum length must be at least 50 characters, with a minimum of 5 unique characters.

  • DJANGO_DATABASE_URL

    • Default: "sqlite://:memory:"

    • Set to DJANGO_DATABASE_URL=sqlite:///db.sqlite to use a database file that persists in development. Use DJANGO_DATABASE_URL=postgres://<USER>:<PASSWORD>@<HOST>:<PORT>/<NAME> to use a Postgres server for example. Read dj_database_url for examples to connect with other databases.

  • DJANGO_DATABASE_CONN_MAX_AGE

  • DJANGO_TIME_ZONE

    • Default: "Europe/Amsterdam"

    • Used to set the variable TIME_ZONE.

  • DJANGO_ALLOWED_HOSTS

AWS