docs: Fix explanation of case sensitivity for Settings (#1110)

* docs: Fix explanation of case sensitivity for `Settings`

* Add changes

* Update docs/usage/settings.md

Co-Authored-By: Samuel Colvin <samcolvin@gmail.com>

* Update docs/usage/settings.md

Co-Authored-By: Samuel Colvin <samcolvin@gmail.com>

* Update docs/usage/settings.md

Co-Authored-By: Samuel Colvin <samcolvin@gmail.com>
This commit is contained in:
Anthony
2019-12-18 17:16:38 +03:00
committed by Samuel Colvin
parent 42c4b3e3a1
commit 1a273f2e64
2 changed files with 6 additions and 2 deletions
+1
View File
@@ -0,0 +1 @@
docs: Fix explanation of case sensitive environment variable names when populating `BaseSettings` subclass attributes.
+5 -2
View File
@@ -50,8 +50,11 @@ Case-sensitivity can be turned on through the `Config`:
{!.tmp_examples/settings_case_sensitive.py!}
```
When `case_sensitive` is `True`, the environment variable must be in all-caps,
so in this example `redis_host` could only be modified via `export REDIS_HOST`.
When `case_sensitive` is `True`, the environment variable names must match field names (optionally with a prefix),
so in this example
`redis_host` could only be modified via `export redis_host`. If you want to name environment variables
all upper-case, you should name attribute all upper-case too. You can still name environment variables anything
you like through `Field(..., env=...)`.
!!! note
On Windows, python's `os` module always treats environment variables as case-insensitive, so the