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://:@:/`` to use a Postgres server for example. Read `dj_database_url `_ for examples to connect with other databases. * ``DJANGO_DATABASE_CONN_MAX_AGE`` * Default: ``60`` * Used to set the variable `CONN_MAX_AGE `_. * ``DJANGO_TIME_ZONE`` * Default: ``"Europe/Amsterdam"`` * Used to set the variable `TIME_ZONE `_. * ``DJANGO_ALLOWED_HOSTS`` * Default: ``[""]`` * Used to set the variable `ALLOWED_HOSTS `_. AWS ^^^ * ``AWS_STORAGE_BUCKET_NAME`` * Default: ``None`` * If not defined, the standard `StaticFilesStorage `_ and `FileSystemStorage `_ are used for static files and media, respectively. .. _recommended-env: 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.