Closed hyzx86 closed 6 years ago
使用django2分支,你现在用的是主线.
好的,谢谢,我再试试
用这个 命令安装就好了对嘛?
pip install git+git://github.com/sshwsfc/xadmin.git@django2
用django2 分支的也不行。。
android@localhost:~/Desktop/xadmin-django2/demo_app$ python3 manage.py runserver
Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x6fbcc5d268>
Traceback (most recent call last):
File "/home/android/Desktop/xadmin-django2/demo_app/../xadmin/plugins/wizard.py", line 7, in <module>
from formtools.wizard.storage import get_storage
File "/usr/local/lib/python3.5/dist-packages/formtools/wizard/storage/__init__.py", line 3, in <module>
from .base import BaseStorage
File "/usr/local/lib/python3.5/dist-packages/formtools/wizard/storage/base.py", line 3, in <module>
from django.utils.functional import lazy_property
ImportError: cannot import name 'lazy_property'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/django/utils/autoreload.py", line 225, in wrapper
fn(*args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/django/core/management/commands/runserver.py", line 112, in inner_run
autoreload.raise_last_exception()
File "/usr/local/lib/python3.5/dist-packages/django/utils/autoreload.py", line 248, in raise_last_exception
raise _exception[1]
File "/usr/local/lib/python3.5/dist-packages/django/core/management/__init__.py", line 327, in execute
autoreload.check_errors(django.setup)()
File "/usr/local/lib/python3.5/dist-packages/django/utils/autoreload.py", line 225, in wrapper
fn(*args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/django/__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/usr/local/lib/python3.5/dist-packages/django/apps/registry.py", line 120, in populate
app_config.ready()
File "/home/android/Desktop/xadmin-django2/demo_app/../xadmin/apps.py", line 14, in ready
self.module.autodiscover()
File "/home/android/Desktop/xadmin-django2/demo_app/../xadmin/__init__.py", line 49, in autodiscover
register_builtin_plugins(site)
File "/home/android/Desktop/xadmin-django2/demo_app/../xadmin/plugins/__init__.py", line 41, in register_builtin_plugins
[import_module('xadmin.plugins.%s' % plugin) for plugin in PLUGINS if plugin not in exclude_plugins]
File "/home/android/Desktop/xadmin-django2/demo_app/../xadmin/plugins/__init__.py", line 41, in <listcomp>
[import_module('xadmin.plugins.%s' % plugin) for plugin in PLUGINS if plugin not in exclude_plugins]
File "/usr/lib/python3.5/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 662, in exec_module
File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
File "/home/android/Desktop/xadmin-django2/demo_app/../xadmin/plugins/wizard.py", line 12, in <module>
from django.contrib.formtools.wizard.storage import get_storage
ImportError: No module named 'django.contrib.formtools'
To repair
sudo pip install -U django-formtools
现在django pip安装都默认V2了
按照教程 直接运行报错,希望能够修复,非常感谢
windows 环境 Python3.6 Django2
PS D:\360安全浏览器下载\xadmin-master\demo_app> python manage.py runserver Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x000001D114703268> Traceback (most recent call last): File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\django\utils\autoreload.py", line 225, in wrapper fn(*args, **kwargs) File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\django\core\management\commands\runserver.py", line 112, in inner_run autoreload.raise_last_exception() File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\django\utils\autoreload.py", line 248, in raise_last_exception raise _exception[1] File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\django\core\management\__init__.py", line 327, in execute autoreload.check_errors(django.setup)() File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\django\utils\autoreload.py", line 225, in wrapper fn(*args, **kwargs) File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\django\__init__.py", line 24, in setup apps.populate(settings.INSTALLED_APPS) File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\django\apps\registry.py", line 112, in populate app_config.import_models() File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\django\apps\config.py", line 198, in import_models self.models_module = import_module(models_module_name) File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\importlib\__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 994, in _gcd_import File "<frozen importlib._bootstrap>", line 971, in _find_and_load File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 665, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 678, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "D:\360安全浏览器下载\xadmin-master\demo_app\..\xadmin\models.py", line 8, in <module> from django.core.urlresolvers import NoReverseMatch, reverse ModuleNotFoundError: No module named 'django.core.urlresolvers'