-
Notifications
You must be signed in to change notification settings - Fork 66
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
Settings file to declare what settings should be merged #2294
Conversation
Instead of mandating what settting iterables should be merged from the runtime, a user writing a custom settings module can declare a set of MERGEABLE_SETTINGS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me (just the one minor comment), and solves my problem. :-D
src/utils/__init__.py
Outdated
@@ -16,7 +16,7 @@ | |||
|
|||
LOCK = threading.Lock() | |||
|
|||
MERGEABLE_SETTINGS = {"INSTALLED_APPS", "MIDDLEWARE_CLASSES"} | |||
MERGEABLE_SETTINGS = {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't look to be used anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We try to be extra defensive when removing public constants like this in case a plugin out there might be using them, so we keep them for at least one release cycle.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes sense :-). For full backwards-compatibility then, should this be unchanged, and be the default if it's not provided in custom_settings
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, though as {}
it's now a dictionary and not a set as before :-)
test this please |
Signed-off-by: Mauro MSL <[email protected]>
Signed-off-by: Mauro MSL <[email protected]>
Instead of mandating what settting iterables should be merged from the
runtime, a user writing a custom settings module can declare a set of
MERGEABLE_SETTINGS
Closes #2284