import_string(dotted_path)
[source]
Imports a dotted module path and returns the attribute/class designated by the last name in the path. Raises ImportError
if the import failed. For example:
1 2 | from django.utils.module_loading import import_string ValidationError = import_string( 'django.core.exceptions.ValidationError' ) |
is equivalent to:
1 | from django.core.exceptions import ValidationError |
Please login to continue.