Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Django4.0版本,一些依赖错误 #5

Open
owlrock7 opened this issue Jun 10, 2022 · 0 comments
Open

Django4.0版本,一些依赖错误 #5

owlrock7 opened this issue Jun 10, 2022 · 0 comments

Comments

@owlrock7
Copy link

系统环境版本

debian 11
python 3.9.2 
pipenv 11.9.0
Django==4.0.5
  - asgiref [required: <4,>=3.4.1, installed: 3.5.2]
  - sqlparse [required: >=0.2.2, installed: 0.4.2]
excel==1.0.0
  - xlrd [required: Any, installed: 2.0.1]
lxml==4.9.0
pkg-resources==0.0.0
urllib3==1.26.9

运行第一步

python manage.py makemigrations

报错信息

xlsx_over_web/webtable/urls.py", line 19, in <module>
    from django.conf.urls import url
ImportError: cannot import name 'url' from 'django.conf.urls' (/root/.local/share/virtualenvs/xlsx_over_web-TWphuyVb/lib/python3.9/site-packages/django/conf/urls/__init__.py)

看起来是 django 4.0 移除了 url ,搜了搜换成 re_path , 继续报错

from django.contrib.auth.views import login, logout
ImportError: cannot import name 'login' from 'django.contrib.auth.views'

这个真不会了,大佬看看是限制版本还是改改引用?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant