简体   繁体   English

django postgres 集成错误,没有这样的表 - 授权用户

[英]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.

相关问题 数据库错误,没有这样的表:Django中的auth_user - database error, no such table:auth_user in django Django 1.6.5用户注册错误,无此表:auth_user - Django 1.6.5 user registration error no such table: auth_user Django超级用户固定装置错误-没有这样的表:auth_user - Django superuser fixture error - no such table: auth_user 没有这样的表:Django 注册表单的“身份验证用户”错误 - No Such Table: 'Auth User' Error with Django Sign Up Form Django 错误没有这样的表:main.auth_user__old - Django error no such table: main.auth_user__old Django-admin 错误:没有这样的表 auth_user - Django-admin error: no such table auth_user 我在 postgres 的 auth_user 中添加了一个移动列(在 django 上工作)。但是出现错误:User() 得到了一个意外的关键字参数“移动” - I added a mobile column in auth_user in postgres(working on django).But getting error:User() got an unexpected keyword argument 'mobile' Django/Postgres 集成问题 - Django/Postgres integration issues 创建超级用户 django.db.utils.OperationalError 时出现 Django 错误:没有这样的表:auth_user - Django error when creating superuser django.db.utils.OperationalError: no such table: auth_user 无法在 django 中创建超级用户,出现错误“django.db.utils.OperationalError: no such table: auth_user” - unable to create superuser in django getting error "django.db.utils.OperationalError: no such table: auth_user"
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM