[英]Django - django.db.utils.OperationalError: no such table: django_session
I am trying to use AbstractUser in django.我正在尝试在 django 中使用 AbstractUser。 I made migrations and migrated and everything goes fine but then i tried to login using admin and i got the Following Error-我进行了迁移并进行了迁移,一切正常,但随后我尝试使用管理员登录,但出现以下错误-
no such table: django_session Request Method: GET Request URL: http://127.0.0.1:8000/admin/ Django Version: 3.1.7 Exception Type: OperationalError Exception Value: no such table: django_session Request Method: GET Request URL: http://127.0.0.1:8000/admin/ Django Version: 3.1.7 Exception Type: OperationalError Exception Value:
no such table: django_session没有这样的表:django_session
Can anyone help how should i fix this?谁能帮助我应该如何解决这个问题?
I have also added AUTH_USER_MODEL in settings.py我还在 settings.py 中添加了 AUTH_USER_MODEL
I realized that the issue was i just making migrations only for my django app not for whole project so i fixed that and then everything is working fine.我意识到问题是我只是为我的 django 应用程序而不是整个项目进行迁移,所以我修复了它,然后一切正常。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.