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

Improve application configuration #152

Closed
lilioid opened this issue Oct 3, 2020 · 1 comment · Fixed by #171
Closed

Improve application configuration #152

lilioid opened this issue Oct 3, 2020 · 1 comment · Fixed by #171

Comments

@lilioid
Copy link
Member

lilioid commented Oct 3, 2020

The problem

Currently it is not clearly discernible which configuration goes where. For example we have settings_base.py as well as settings.py and then some stuff which is configured via environment variables (whether IN_DOCKER is non-empty).
This I would like to change because it is not clear where to place configuration options when a new feature is introduced as well as where to configure the application when someone wants to deploy it.

Proposed solutions

As this is a problem common in the django community, multiple solutions have been thought of.
Most of them have been collected into this wiki article about split-settings but I want to present some possible solutions here as well:

  • Keep the current structure but thoroughly sort through it. We would define which options go into which file and stick to it.
  • Use the django-split-settings package which is similar to what we are currently doing but might offer a more structured approach.
  • Use the django-configurations which uses an object-oriented approach. This would mean we could clearly define a base configuration and then adapt it into more specific environments while keeping the inherited values.

What I would also like to see is some form of configuration validation. It does not have to be super sophisticated but missing configuration options should be reported to the user.

I would like for at least @NFiedler and @timonegk to weigh in on this before I start to implement anything.

@lilioid
Copy link
Member Author

lilioid commented Oct 18, 2020

If noone has anything more to say, I'll start implementing a solution with django-configurations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant