diff options
| author | Tim Graham <timograham@gmail.com> | 2013-04-02 12:59:43 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2013-04-02 12:59:43 -0400 |
| commit | b9dbd1dd2fddbd4ba20e1ab983b0d6712d21da00 (patch) | |
| tree | b53b8a1d6eeeb3e7f0876c13223e06928cb30870 /docs/ref | |
| parent | 8d05e6c0c7fe35df86799fa2fdcdb6499a4f6312 (diff) | |
Fixed #19748 - Documented django.utils.module_loading.import_by_path
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/utils.txt | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/docs/ref/utils.txt b/docs/ref/utils.txt index b103a9acdf..a7d5b6690e 100644 --- a/docs/ref/utils.txt +++ b/docs/ref/utils.txt @@ -643,6 +643,28 @@ escaping HTML. Converts a positive integer to a base 36 string. On Python 2 ``i`` must be smaller than :data:`sys.maxint`. +``django.utils.module_loading`` +=============================== + +.. module:: django.utils.module_loading + :synopsis: Functions for working with Python modules. + +Functions for working with Python modules. + +.. function:: import_by_path(dotted_path, error_prefix='') + + Imports a dotted module path and returns the attribute/class designated by + the last name in the path. Raises + :exc:`~django.core.exceptions.ImproperlyConfigured` if something goes + wrong. For example:: + + from django.utils.module_loading import import_by_path + import_by_path = import_by_path('django.utils.module_loading.import_by_path') + + is equivalent to:: + + from django.utils.module_loading import import_by_path + ``django.utils.safestring`` =========================== |
