ModuleNotFoundError: No module named 'xadmin.views.delete'(已解决)
来源:1-1 强力django+杀手级xadmin 打造上线标准的在线教育平台
HubertzZ
2020-05-31
配置完xadmin运行makemigration的时候报错
manage.py@mxonline > makemigrations
bash -cl "/Users/hubertdou/.virtualenvs/mxonline/bin/python /Applications/PyCharm.app/Contents/plugins/python/helpers/pycharm/django_manage.py makemigrations /Users/hubertdou/Desktop/PYthon/mxonline"
Tracking file by folder pattern: migrations
Traceback (most recent call last):
File “/Applications/PyCharm.app/Contents/plugins/python/helpers/pycharm/django_manage.py”, line 52, in
run_command()
File “/Applications/PyCharm.app/Contents/plugins/python/helpers/pycharm/django_manage.py”, line 46, in run_command
run_module(manage_file, None, ‘main’, True)
File “/Users/hubertdou/anaconda3/lib/python3.7/runpy.py”, line 205, in run_module
return _run_module_code(code, init_globals, run_name, mod_spec)
File “/Users/hubertdou/anaconda3/lib/python3.7/runpy.py”, line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
File “/Users/hubertdou/anaconda3/lib/python3.7/runpy.py”, line 85, in _run_code
exec(code, run_globals)
File “/Users/hubertdou/Desktop/PYthon/mxonline/manage.py”, line 21, in
main()
File “/Users/hubertdou/Desktop/PYthon/mxonline/manage.py”, line 17, in main
execute_from_command_line(sys.argv)
File “/Users/hubertdou/.virtualenvs/mxonline/lib/python3.7/site-packages/django/core/management/init.py”, line 381, in execute_from_command_line
utility.execute()
File “/Users/hubertdou/.virtualenvs/mxonline/lib/python3.7/site-packages/django/core/management/init.py”, line 357, in execute
django.setup()
File “/Users/hubertdou/.virtualenvs/mxonline/lib/python3.7/site-packages/django/init.py”, line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File “/Users/hubertdou/.virtualenvs/mxonline/lib/python3.7/site-packages/django/apps/registry.py”, line 122, in populate
app_config.ready()
File “/Users/hubertdou/Desktop/PYthon/mxonline/xadmin/apps.py”, line 14, in ready
self.module.autodiscover()
File “/Users/hubertdou/Desktop/PYthon/mxonline/xadmin/init.py”, line 29, in autodiscover
from xadmin.views import register_builtin_views
File “/Users/hubertdou/Desktop/PYthon/mxonline/xadmin/views/init.py”, line 7, in
from .delete import DeleteAdminView
ModuleNotFoundError: No module named ‘xadmin.views.delete’
1回答
-
你的django是什么版本 最好不要使用django3.0 以及xadmin的源码是哪里下载的?
022020-06-02
相似问题