django-tutorial icon indicating copy to clipboard operation
django-tutorial copied to clipboard

如何查看数据库

Open Aiooon opened this issue 8 years ago • 4 comments

在这个项目中 我执行到这一步时: 6d7cf121 409e2a6c30 aa5bf159 jpg_recompress

我无法找到和链接到我所建的数据库和表 1 jpg

826b9e4c 40ebef0520 aa5bf159 jpg_recompress

起初我以为是表创建失败了,但是在我执行后面的步骤时,发现可以对数据库进行正常操作,但我仍然无法找到我的数据库和表,pycharm中也没有显示 616c88a12d9446ea90cb7d47a242ead2 d6baac89 404754b179 aa5bf159 jpg_recompress

查了很多方法还是没有解决,希望你能帮助我,谢谢!

Aiooon avatar Oct 26 '17 06:10 Aiooon

hi @Aiooon 我從你的截圖看,db.sqlite3在你的路徑 django-tutorial/db.sqlite3

1.使用pycharm查看資料庫 你沒辦法從 pycharm 看db,應該只是因為你沒有 driver (download missing driver files) 安裝完後(點你截圖上的 download ),應該就可以使用了。

2.使用 sqlitebrowser 觀看資料庫 下載後,將你的 db.sqlite3 用 sqlitebrowser 開啟即可。

twtrubiks avatar Oct 26 '17 07:10 twtrubiks

非常感谢!已经解决了!

Aiooon avatar Oct 26 '17 10:10 Aiooon

請問,superuser 創建後能否刪除?以及如何修改superuser的密碼?

ekils avatar Apr 24 '18 09:04 ekils

@ekils 當然可以刪除。

修改superuser的密碼

python manage.py changepassword *username* 

官方文件 Changing passwords

twtrubiks avatar Apr 27 '18 06:04 twtrubiks