dj_database_url.config takes an env option that allows for customising the env var used for the database URL away from the default of DATABASE_URL:
|
def config( |
|
env: str = DEFAULT_ENV, |
However, this option isn't documented in the README:
https://github.com/jazzband/dj-database-url/blob/7906f3bf800105e6ab33bfbf44e6863fd178295a/README.rst#usage
Customising the env var is needed in the case of multiple DBs, where everything but the primary has to use something other than DATABASE_URL.
dj_database_url.configtakes anenvoption that allows for customising the env var used for the database URL away from the default ofDATABASE_URL:dj-database-url/dj_database_url/__init__.py
Lines 65 to 66 in 7906f3b
However, this option isn't documented in the README:
https://github.com/jazzband/dj-database-url/blob/7906f3bf800105e6ab33bfbf44e6863fd178295a/README.rst#usage
Customising the env var is needed in the case of multiple DBs, where everything but the primary has to use something other than
DATABASE_URL.