Skip to main content

autodiscover_modules

Auto-discover INSTALLED_APPS modules and fail silently when not present. This forces an import on them to register any admin bits they may want. You may provide a register_to keyword parameter as a way to access a registry. This register_to object must have a _registry instance variable to access it.

def autodiscover_modules(
*args: string,
**kwargs: any
) - > null

Auto-discover INSTALLED_APPS modules and fail silently when not present. This forces an import on them to register any admin bits they may want.

Parameters

NameTypeDescription
*argsstringOne or more submodule names to search for and import within each installed application (e.g., 'admin' or 'tasks').
**kwargsanyOptional keyword arguments, specifically supporting 'register_to' to provide a registry object for state management during imports.

Returns

TypeDescription
nullNothing is returned; the function performs side-effect imports to trigger module registration.