更新时间:2023-10-10 22:58:10
我也遇到这个问题。我正在浏览 PyCharm Django指南。我通过删除我的sqlite数据库文件并再次运行syncdb来修复此问题。我不知道为什么它第一次没有工作,但现在工作。
I encountered this problem as well. I was going through the PyCharm Django guide. I fixed this by deleting my sqlite database file and running syncdb again. I don't know why it didn't work the first time, but it works now.
另外,这可能值得下载 SQLite数据库浏览器,以便您可以看到SQLite数据库的实际结构。对于这个问题,您对django_site表感兴趣。在我删除了我的数据库文件并重新启动syncdb后,此表中有一行。
Also, it's probably worth downloading the SQLite Database Browser so that you can see the actual structure of your SQLite database. For this issue, you're interested in the django_site table. After I deleted my database file and reran syncdb, there was one row in this table.