Import utilities for registries.
- lazy_import_registry(module_path, registry_name, **kwargs)[source]¶
Lazily import and construct a registry on access.
This is useful for providing registry instances in a Django app’s
__init__.pyfile without needing to import other modules that might interfere with the Django initialization process. When accessed for the first time, the registry will be imported and constructed.
This can also speed up the startup process, depending on the complexity of registries.
A wrapper that will dynamically load and forward on to the registry.
- Return type