Add support for config layers to SiteConfiguration.get().
Review Request #14431 — Created May 9, 2025 and submitted
This change adds a new
layers
argument toSiteConfiguration.get()
.
This allows passing in a list of additional settings dictionaries, which
will be checked before the main settings dict and defaults dicts.Callers can use this to add overrides for specific keys: for example,
one might want to have a global setting for the server, a setting for
tenant accounts, and even a user setting for individual users. This
would be accomplished by passing in
layers=[user_settings, tenant_settings]
.This also does some additional cleanup and typing for surrounding code,
reducing the noise I saw in my editor.
Ran unit tests.
Summary | ID |
---|---|
104c32840c609b88e64e031c89d7fd501a580972 |
Description | From | Last Updated |
---|---|---|
This doesn't need the parens (unless we want to do that in this case, but the previous function didn't). |
|
|
This needs a Version Added and the main docstring needs a Version Changed. |
|
|
Let's pull self.siteconfig out into a local variable. We use it in almost every statement. |
|