1
# pragma: no cover
2 2
INI_EXTENSIONS = (".ini", ".conf", ".properties")
3 2
TOML_EXTENSIONS = (".toml", ".tml")
4 2
YAML_EXTENSIONS = (".yaml", ".yml")
5 2
JSON_EXTENSIONS = (".json",)
6

7 2
ALL_EXTENSIONS = (
8
    INI_EXTENSIONS + TOML_EXTENSIONS + YAML_EXTENSIONS + JSON_EXTENSIONS
9
)  # noqa
10

11 2
EXTERNAL_LOADERS = {
12
    "ENV": "dynaconf.loaders.env_loader",
13
    "VAULT": "dynaconf.loaders.vault_loader",
14
    "REDIS": "dynaconf.loaders.redis_loader",
15
}
16

17 2
DJANGO_PATCH = """
18
# HERE STARTS DYNACONF EXTENSION LOAD (Keep at the very bottom of settings.py)
19
# Read more at https://dynaconf.readthedocs.io/en/latest/guides/django.html
20
import dynaconf  # noqa
21
settings = dynaconf.DjangoDynaconf(__name__)  # noqa
22
# HERE ENDS DYNACONF EXTENSION LOAD (No more code below this line)
23
 """
24

25 2
INSTANCE_TEMPLATE = """
26
from dynaconf import Dynaconf
27

28
settings = Dynaconf(
29
    envvar_prefix="DYNACONF",
30
    settings_files={settings_files},
31
)
32

33
# `envvar_prefix` = export envvars with `export DYNACONF_FOO=bar`.
34
# `settings_files` = Load this files in the order.
35
"""
36

37 2
EXTS = (
38
    "py",
39
    "toml",
40
    "tml",
41
    "yaml",
42
    "yml",
43
    "ini",
44
    "conf",
45
    "properties",
46
    "json",
47
)
48 2
DEFAULT_SETTINGS_FILES = [f"settings.{ext}" for ext in EXTS] + [
49
    f".secrets.{ext}" for ext in EXTS
50
]

Read our documentation on viewing source code .

Loading