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_DEBUGDefault:
FalseSet
DJANGO_DEBUG=1to set this variable toTrue.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_KEYImportant
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_URLDefault:
"sqlite://:memory:"Set to
DJANGO_DATABASE_URL=sqlite:///db.sqliteto use a database file that persists in development. UseDJANGO_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_AGEDefault:
60Used to set the variable CONN_MAX_AGE.
DJANGO_TIME_ZONEDefault:
"Europe/Amsterdam"Used to set the variable TIME_ZONE.
DJANGO_ALLOWED_HOSTSDefault:
[""]Used to set the variable ALLOWED_HOSTS.
AWS
AWS_STORAGE_BUCKET_NAMEDefault:
NoneIf not defined, the standard StaticFilesStorage and FileSystemStorage are used for static files and media, respectively.
Recommended Development Variables
For development, it is recommended to start with the following variables set in your environment:
DJANGO_SECRET_KEY=CustomString
DJANGO_DEBUG=1
DJANGO_DATABASE_URL=sqlite:///db.sqlite
Windows users can run into a CommandError running uv run manage.py tailwind start. To solve this, set the the environment variable NPM_BIN_PATH as follows:
NPM_BIN_PATH=npm.cmd # Windows users only, leave unset for Unix.
Then, depending on which part of the project is being developed, it is possible to customize the environment variables to suit your own needs.