Skip to content

Can't load 'settings.toml' values #940

Answered by tjnd89
tjnd89 asked this question in Q&A
Discussion options

You must be logged in to vote

Ok, found the answer. According to https://github.com/dynaconf/dynaconf/blob/master/3.x-release-notes.md,

Dynaconf is now envless by default.
Historically Dynaconf worked in a multi layered environments for loading data from files, so you were supposed to have a file like:

[default]
key = 'value'

[production]
key = 'value'
Now starting on 3.0.0 the environments are disabled by default, so the same file can be created as.

key = 'value'
And you can still have the environments but only if you explicit specify it when creating your instance.

To have the previous behavior supporting all environments from the first level of a file.

settings = Dynaconf(
environments=True
)

so if I initialize m…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by tjnd89
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant