ImportError: cannot import name 'SKIP_ADMIN_LOG'

来源:3-6 migrations原理及表生成

慕斯1113226

2021-07-07

新学员使用django 2.0 是pip install -r requirements.txt 还是pip install -r requirements?

我是执行的pip install -r requirements.txt

因为代码下载下来默认有migrations,所以我直接执行的
python manage.py migrate users
报错:

(djangovue_mukewang) [root@k8s-deploy-104 MxShop]# python manage.py migrate users
Traceback (most recent call last):
File “manage.py”, line 21, in
main()
File “manage.py”, line 17, in main
execute_from_command_line(sys.argv)
File “/root/djangovue_mukewang/lib/python3.6/site-packages/django/core/management/init.py”, line 371, in execute_from_command_line
utility.execute()
File “/root/djangovue_mukewang/lib/python3.6/site-packages/django/core/management/init.py”, line 347, in execute
django.setup()
File “/root/djangovue_mukewang/lib/python3.6/site-packages/django/init.py”, line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File “/root/djangovue_mukewang/lib/python3.6/site-packages/django/apps/registry.py”, line 120, in populate
app_config.ready()
File “/root/djangovue_coding/MxShop/extra_apps/xadmin/apps.py”, line 14, in ready
self.module.autodiscover()
File “/root/djangovue_coding/MxShop/extra_apps/xadmin/init.py”, line 49, in autodiscover
register_builtin_plugins(site)
File “/root/djangovue_coding/MxShop/extra_apps/xadmin/plugins/init.py”, line 43, in register_builtin_plugins
[import_module(‘xadmin.plugins.%s’ % plugin) for plugin in PLUGINS if plugin not in exclude_plugins]
File “/root/djangovue_coding/MxShop/extra_apps/xadmin/plugins/init.py”, line 43, in
[import_module(‘xadmin.plugins.%s’ % plugin) for plugin in PLUGINS if plugin not in exclude_plugins]
File “/usr/local/python3/lib/python3.6/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “

写回答

1回答

bobby

2021-07-08

1
2
bobby
回复
慕斯1113226
好的。
2021-07-12
共2条回复

Python前后端分离开发Vue+Django REST framework实战

Django REST framework课程视频,RESTFul API前后端分离开发

2873 学习 · 2457 问题

查看课程