mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2024-11-22 01:26:51 +03:00
Make #492 follow-up fix of configuration provider docs for environment variables interpolation
This commit is contained in:
parent
eda67e42d0
commit
49e2cc75c2
|
@ -50,9 +50,9 @@ where ``examples/providers/configuration/config.ini`` is:
|
||||||
.. code-block:: ini
|
.. code-block:: ini
|
||||||
|
|
||||||
[section]
|
[section]
|
||||||
option1 = {$ENV_VAR}
|
option1 = ${ENV_VAR}
|
||||||
option2 = {$ENV_VAR}/path
|
option2 = ${ENV_VAR}/path
|
||||||
option3 = {$ENV_VAR:default}
|
option3 = ${ENV_VAR:default}
|
||||||
|
|
||||||
See also: :ref:`configuration-envs-interpolation`.
|
See also: :ref:`configuration-envs-interpolation`.
|
||||||
|
|
||||||
|
@ -208,7 +208,7 @@ variable ``ENV_NAME`` is undefined, configuration provider will substitute value
|
||||||
.. code-block:: ini
|
.. code-block:: ini
|
||||||
|
|
||||||
[section]
|
[section]
|
||||||
option = {$ENV_NAME:default}
|
option = ${ENV_NAME:default}
|
||||||
|
|
||||||
If you'd like to specify a default value for environment variable inside of the application you can use
|
If you'd like to specify a default value for environment variable inside of the application you can use
|
||||||
``os.environ.setdefault()``.
|
``os.environ.setdefault()``.
|
||||||
|
@ -380,7 +380,7 @@ an undefined environment variable without a default value.
|
||||||
.. code-block:: ini
|
.. code-block:: ini
|
||||||
|
|
||||||
section:
|
section:
|
||||||
option: {$UNDEFINED}
|
option: ${UNDEFINED}
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user