Crumb definitions discovering¶
Crumb definitions are registred through files that are loaded as Python modules, where some code can register needed crumbs.
Automatic discovering for available crumbs definitions
Before looking at crumbs files, registry start from
settings.AUTOBREADCRUMBS_TITLES
items if setted, else an empty Dict.Then it try to load possible root crumb file defined in
settings.AUTOBREADCRUMBS_ROOT_CRUMB
(as a Python path). And finally load each crumbs file finded insettings.INSTALLED_APPS
.Keyword Arguments: filename (string) – Module filename to search for. Default to crumbs
, so it will search for acrumbs.py
file at root of every enabled module fromsettings.INSTALLED_APPS
.Returns: List of successfully loaded Python paths. Return type: list
Try to discover and load a
crumbs.py
file from given Python path.Parameters: module_path (string) – Python path to scan for filename
module.Keyword Arguments: filename (string) – Optional module filename to search for, usually crumbs.py
, default toNone
.Raises: Exception
– Raise any occuring exception from loaded Python path.Returns: Python path ( module.filename
) for discovered crumbs module. Iffilename
does not exists in module, returnNone
.Return type: string or None