module documentation

Undocumented

Function import​_string Import a dotted module path and return the attribute/class designated by the last name in the path. Raise ImportError if the import failed.
Function 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.
Function cached​_import Undocumented
Function module​_dir Find the name of the directory that contains a module, if possible.
Function module​_has​_submodule See if 'module' is in 'package'.
def import_string(dotted_path):
Import a dotted module path and return the attribute/class designated by the last name in the path. Raise ImportError if the import failed.
def autodiscover_modules(*args, **kwargs):

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 cached_import(module_path, class_name):

Undocumented

def module_dir(module):

Find the name of the directory that contains a module, if possible.

Raise ValueError otherwise, e.g. for namespace packages that are split over several directories.

def module_has_submodule(package, module_name):
See if 'module' is in 'package'.