Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Directly load configuration values from environment variables instead of relying on Django settings #6

Open
stevenbal opened this issue Apr 11, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@stevenbal
Copy link
Contributor

In Open Inwoner we are implementing setup_configuration and we were wondering if it is really necessary for every configuration variable to be defined as a setting.

From my understanding it was originally implemented using settings, because there could be certain settings that have defaults (which should also be used when running setup_configuration), but in the case of Open Inwoner we have several steps that don't use any defaults, leading to a lot of duplication because we have to define settings for everything: https://github.com/maykinmedia/open-inwoner/blob/develop/src/open_inwoner/conf/app/setup_configuration.py#L17

@annashamray is directly loading variables from the environment maybe something that could be possible next to using settings?

@stevenbal stevenbal added the enhancement New feature or request label Apr 11, 2024
@annashamray
Copy link
Contributor

Sergei also proposed to remove settings layer cause it's unnecessary.
Having them both could be a solution. We can first check the setting and if it doesn't exist we can check the environment.
I don't mind this approach.

@alextreme
Copy link
Member

@sjoerdie I think this issue is what you mentioned would be preferable, right?

@swrichards swrichards self-assigned this Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants