mirror of
https://github.com/django/django.git
synced 2025-02-04 22:47:53 +00:00
[1.7.x] Fixed #22618 -- Improved import_string example.
Thanks ewjoachim for the sugggestion. Backport of c501662f3c from master
This commit is contained in:
parent
aa3fd4b97e
commit
0bb90de869
@ -727,11 +727,11 @@ Functions for working with Python modules.
|
||||
example::
|
||||
|
||||
from django.utils.module_loading import import_string
|
||||
ImproperlyConfigured = import_string('django.core.exceptions.ImproperlyConfigured')
|
||||
ValidationError = import_string('django.core.exceptions.ValidationError')
|
||||
|
||||
is equivalent to::
|
||||
|
||||
from django.core.exceptions import ImproperlyConfigured
|
||||
from django.core.exceptions import ValidationError
|
||||
|
||||
.. function:: import_by_path(dotted_path, error_prefix='')
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user