get_database_config#

classmethod ADR.get_database_config(raise_exception: bool = False) dict | None#

Return the Django DATABASES configuration, if available.

Parameters:
raise_exceptionbool, default: False

If True, raise ImproperlyConfiguredError when settings are not yet configured.

Returns:
dict or None

The DATABASES mapping, or None if settings are not configured and raise_exception is False.

Raises:
ImproperlyConfiguredError

If Django settings are not configured and raise_exception=True.