Skip to content

[bug] Use of the format marker occurs before overriding values through an environment variable #603

@artctv

Description

@artctv

I'm not sure if this is a bug, but such logic is not described:
in settings.toml with setting environments=True:

[default.database]
DB_HOST = "127.0.0.1"
DB_PORT = "5432"
DB_ADDRES = "@format {this.database.DB_HOST}:{this.database.DB_PORT}"

Then, if the value DB_PORT will be overridden using the environment variable, DB_PORT value will be equal to the value from the environment variable, but the DB_ADDRES value will be created from the original DB_PORT equal 5432

As I understand it, all variables using the marker @format occur before being overridden using environment variables. But, since the marker @format is a dynaconf feature and has nothing to do with the .toml format, this logic is not described anywhere, and can this be changed?

Metadata

Metadata

Assignees

Labels

LazyIssueRelated to lazy evaluation such as @format etc...bugduplicate

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions