We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 625f613 commit 5ea3cdcCopy full SHA for 5ea3cdc
paraer/para.py
@@ -3,7 +3,8 @@
3
import six
4
from functools import wraps
5
from uuid import uuid1
6
-from importlib import import_module
+from django.utils.module_loading import import_string
7
+
8
from .datastrctures import Valid
9
10
@@ -94,7 +95,7 @@ def decorator(func):
94
95
swagger = _doc_generater(itemset, func)
96
data_method = default_data_method
97
if getattr(settings, 'PARAER_DATA_METHOD', ''):
- data_method = import_module(settings.PARAER_DATA_METHOD) # 获取data的方法
98
+ data_method = import_string(settings.PARAER_DATA_METHOD) # 获取data的方法
99
100
def wrapper(cls, request, *args, **kwargs):
101
paramap = dict(kwargs)
0 commit comments