Code

Ticket #19748: 19748.diff

File 19748.diff, 1.1 KB (added by timo, 15 months ago)
Line 
1diff --git a/docs/ref/utils.txt b/docs/ref/utils.txt
2index b103a9a..a7d5b66 100644
3--- a/docs/ref/utils.txt
4+++ b/docs/ref/utils.txt
5@@ -643,6 +643,28 @@ escaping HTML.
6     Converts a positive integer to a base 36 string. On Python 2 ``i`` must be
7     smaller than :data:`sys.maxint`.
8 
9+``django.utils.module_loading``
10+===============================
11+
12+.. module:: django.utils.module_loading
13+   :synopsis: Functions for working with Python modules.
14+
15+Functions for working with Python modules.
16+
17+.. function:: import_by_path(dotted_path, error_prefix='')
18+
19+    Imports a dotted module path and returns the attribute/class designated by
20+    the last name in the path. Raises
21+    :exc:`~django.core.exceptions.ImproperlyConfigured` if something goes
22+    wrong. For example::
23+
24+        from django.utils.module_loading import import_by_path
25+        import_by_path = import_by_path('django.utils.module_loading.import_by_path')
26+
27+    is equivalent to::
28+
29+        from django.utils.module_loading import import_by_path
30+
31 ``django.utils.safestring``
32 ===========================
33