fairdm.conf#
FairDM configuration package: settings baseline, environment layers and addons.
Provides a production-ready Django configuration baseline, layered with environment overrides selected by the DJANGO_ENV variable, and addon integration.
Also holds record, the provenance of the layers setup() composes.
setup() snapshots the caller’s scope before and after each layer’s
include() call and records the delta: the uppercase setting names that layer
wrote. Never a value, because the scope holds SECRET_KEY and the database and
email passwords. The record lives here rather than in settings so it never
appears in a settings dump. show_config reads it after django.setup().
Subpackages#
fairdm.conf.settingsfairdm.conf.settings.static_mediafairdm.conf.settings.cachefairdm.conf.settings.apifairdm.conf.settings.authfairdm.conf.settings.databasefairdm.conf.settings.celeryfairdm.conf.settings.loggingfairdm.conf.settings.emailfairdm.conf.settings.securityfairdm.conf.settings.addonsfairdm.conf.settings.apps
Submodules#
Package Contents#
Classes#
One layer |
|
The ordered record of layers the most recent |
Data#
API#
- class Layer[source]#
One layer
setup()considered, in application order.Attributes: name: The layer’s name, such as
productionor an addon’s name. path: The file the layer was loaded from, orNonewhen it has none. found: Whether the layer’s file existed. settings: The uppercase setting names the layer wrote.- name: str#
None
- path: str | None#
None
- found: bool#
None
- settings: tuple[str, ...]#
‘field(…)’
- class Provenance[source]#
The ordered record of layers the most recent
setup()call composed.Initialization
- add_layer(name: str, path: str | None, found: bool, settings) None[source]#
Append one layer’s outcome, in the order
setup()applied it.Args: name: The layer’s name. path: The file the layer was loaded from, or
None. found: Whether the layer’s file existed. settings: The setting names the layer wrote.
- layers() list[fairdm.conf.Layer][source]#
Return every layer considered, in application order.
Returns: A copy of the recorded layers.
- producer(setting: str) fairdm.conf.Layer | None[source]#
Return the layer that produced
setting’s final resolved value, if any.Later layers override earlier ones, so the producer is the last layer whose settings include this name. A layer is credited when it changed the value, not merely when it assigned one.
Args: setting: The setting name to look up.
Returns: The producing layer, or
Nonewhen no layer wrote the setting.
- record#
‘Provenance(…)’