【发布时间】:2019-12-10 15:40:50
【问题描述】:
我正在尝试运行 longclaw,但是当我 python manage.py migrate 时出现错误。
$python manage.py makemigrations catalog home
Traceback (most recent call last):
File "manage.py", line 11, in <module>
execute_from_command_line(sys.argv)
File "/home/x/Documents/Longclaw/lib/python3.7/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
utility.execute()
File "/home/x/Documents/Longclaw/lib/python3.7/site-packages/django/core/management/__init__.py", line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/x/Documents/Longclaw/lib/python3.7/site-packages/django/core/management/base.py", line 323, in run_from_argv
self.execute(*args, **cmd_options)
File "/home/x/Documents/Longclaw/lib/python3.7/site-packages/django/core/management/base.py", line 361, in execute
self.check()
File "/home/x/Documents/Longclaw/lib/python3.7/site-packages/django/core/management/base.py", line 390, in check
include_deployment_checks=include_deployment_checks,
File "/home/x/Documents/Longclaw/lib/python3.7/site-packages/django/core/management/base.py", line 377, in _run_checks
return checks.run_checks(**kwargs)
File "/home/x/Documents/Longclaw/lib/python3.7/site-packages/django/core/checks/registry.py", line 72, in run_checks
new_errors = check(app_configs=app_configs)
File "/home/x/Documents/Longclaw/lib/python3.7/site-packages/django/core/checks/urls.py", line 13, in check_url_config
return check_resolver(resolver)
File "/home/x/Documents/Longclaw/lib/python3.7/site-packages/django/core/checks/urls.py", line 23, in check_resolver
return check_method()
File "/home/x/Documents/Longclaw/lib/python3.7/site-packages/django/urls/resolvers.py", line 398, in check
for pattern in self.url_patterns:
File "/home/x/Documents/Longclaw/lib/python3.7/site-packages/django/utils/functional.py", line 80, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/home/x/Documents/Longclaw/lib/python3.7/site-packages/django/urls/resolvers.py", line 579, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/home/x/Documents/Longclaw/lib/python3.7/site-packages/django/utils/functional.py", line 80, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/home/x/Documents/Longclaw/lib/python3.7/site-packages/django/urls/resolvers.py", line 572, in urlconf_module
return import_module(self.urlconf_name)
File "/home/x/Documents/Longclaw/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/x/Documents/bakery/bakery/urls.py", line 10, in <module>
from longclaw import urls as longclaw_urls
File "/home/x/Documents/Longclaw/lib/python3.7/site-packages/longclaw/urls.py", line 2, in <module>
from longclaw.basket import urls as basket_urls
File "/home/x/Documents/Longclaw/lib/python3.7/site-packages/longclaw/basket/urls.py", line 2, in <module>
from longclaw.basket import api
File "/home/x/Documents/Longclaw/lib/python3.7/site-packages/longclaw/basket/api.py", line 1, in <module>
from rest_framework.decorators import detail_route, list_route
ImportError: cannot import name 'detail_route' from 'rest_framework.decorators' (/home/x/Documents/Longclaw/lib/python3.7/site-packages/rest_framework/decorators.py)
使用 Python 3.7.2
- $pip 冻结
- beautifulsoup4==4.6.0
- 证书==2019.6.16
- chardet==3.0.4
- Django==2.2.4
- django-countries==5.3.3
- django-extensions==2.2.1
- django-ipware==2.1.0
- django-modelcluster==4.4
- django-taggit==0.24.0
- django-treebeard==4.3
- djangorestframework==3.10.2
- draftjs-exporter==2.1.6
- html5lib==1.0.1
- idna==2.8
- 长爪==1.0.2
- 枕头==6.1.0
- pytz==2019.2
- 请求==2.22.0
- 六==1.12.0
- sqlparse==0.3.0
- Unidecode==1.1.1
- urllib3==1.25.3
- 鹡鸰==2.6
- webencodings==0.5.1
- 柳树==1.1
【问题讨论】:
标签: python django python-3.x django-rest-framework wagtail