• 
      

    Add support for config layers to SiteConfiguration.get().

    Review Request #14431 — Created May 9, 2025 and submitted — Latest diff uploaded

    Information

    Djblets
    release-5.x

    Reviewers

    This change adds a new layers argument to SiteConfiguration.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.

    Commits

    Files