|
7 | 7 | import inflection
|
8 | 8 | from django.conf import settings
|
9 | 9 | from django.utils import six
|
| 10 | +from django.utils.module_loading import import_string as import_class_from_dotted_path |
10 | 11 | from django.utils.translation import ugettext_lazy as _
|
11 | 12 | from rest_framework.exceptions import APIException
|
12 | 13 |
|
|
20 | 21 | except ImportError:
|
21 | 22 | HyperlinkedRouterField = type(None)
|
22 | 23 |
|
23 | | -import django |
24 | | - |
25 | | -if django.VERSION < (1, 7): |
26 | | - from django.utils.module_loading import import_by_path as import_class_from_dotted_path |
27 | | -else: |
28 | | - from django.utils.module_loading import import_string as import_class_from_dotted_path |
29 | | - |
30 | 24 |
|
31 | 25 | def get_resource_name(context):
|
32 | 26 | """
|
|
0 commit comments