API Reference
Module-level helpers
initialize(local_settings_module=None, env_prefix=None)
Initialize the shared config registry.
local_settings_module: dotted path to the local settings moduleenv_prefix: prefix for environment variable lookup (for exampleAPP_)
config(var, default=None, desc=None)
Resolve a regular config value and register it for the management command.
secret(var=None, default=None, desc=None, file_var=None, allow_multiline=False)
Resolve a secret value and register it as masked.
Parameters:
var: literal secret variable name (for exampleDB_PASSWORD)file_var: companion variable name containing a secret file pathdefault: fallback value if neither env nor local is setdesc: optional human-readable descriptionallow_multiline: allow multiline content when reading fromfile_var
get_config_variables()
Return the internal registry of declared config variables (used by the management command).
Casting helpers
as_bool(value)
Convert common string values to booleans.
as_list(value, separator=",")
Split comma-separated strings into lists (or pass lists/tuples through).