[英]django postgres integration error, no such table - auth user
After updating the django settings.py default database to correct values.更新 django settings.py 默认数据库以更正值后。 i am able to run makemigrations and migrate command and also create super user.
我能够运行 makemigrations 和 migrate 命令并创建超级用户。 but when i login to the admin it gives me error of “no such table - auth user, OPERATIONAL ERROR”.
但是当我登录到管理员时,它给了我“没有这样的表 - 授权用户,操作错误”的错误。
I noticed that even if i delete db.sqlite3 file, it comes back when i try to login, i think django looks for table in db.sqlite3 and not postgres.我注意到即使我删除了 db.sqlite3 文件,当我尝试登录时它又回来了,我认为 django 在 db.sqlite3 而不是 postgres 中查找表。
why db.sqlite3 file re appear after deleting?为什么删除后db.sqlite3文件又出现了? how do i correctly configure my settings.py?
我如何正确配置我的 settings.py?
i am integration using digitalocean managed database services with django installed in one droplet, i have integrated both preciously without error but i installed postgres, this is the first time using managed database service.我正在使用 digitalocean 托管数据库服务与安装在一个 droplet 中的 django 进行集成,我已经非常准确地集成了两者,但我安装了 postgres,这是第一次使用托管数据库服务。
Thanks谢谢
It seems that your django settings are still pointing to the SQlite database.看来你的 django 设置仍然指向 SQlite 数据库。
Did you reload your WSGI process?您是否重新加载了 WSGI 进程? If not, the old SQlite settings are still used in memory.
如果不是,旧的 SQlite 设置仍在内存中使用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.