ImportError: cannot import name ‘SKIP_ADMIN_LOG‘ from ‘import_export.admin‘

ImportError: cannot import name ‘SKIP_ADMIN_LOG’ from ‘import_export.admin’

**转载自: https://coding.m.imooc.com/questiondetail?cid=131&qid=237010

亲测有效**
Django2.2.24
python3.8.x

在使用xadmin报错,xadmin复制老师的。
报错信息:


File “D:\AceMyProject\mxshop\mxshop\libs\xadmin\plugins_init_.py”, line 42, in
[import_module(‘xadmin.plugins.%s’ % plugin) for plugin in PLUGINS if plugin not in exclude_plugins]
File “e:\python380\lib\importlib_init_.py”, line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “

解决办法:
…\xadmin\plugins\

#from import_export.admin import DEFAULT_FORMATS, SKIP_ADMIN_LOG, TMP_STORAGE_CLASS
from import_export.admin import DEFAULT_FORMATS, ImportMixin, ImportExportMixinBase

你可能感兴趣的:(Django从入门到精通)