django test app error
練習 django test 的時候出現ㄧ些問題: Creating test database for alias 'default'... Got an error creating the test database: permission denied to create database Type 'yes' if you would like to try deleting the test database 'test_finance', or 'no' to cancel 後來發現是我postgresql 的資料庫使用者沒給予創建資料庫的權限,進入postgresql的root下以下指令: #ALTER USER django CREATEDB; //記得django要換成資料庫使用者的名字 然後 $ python manage.py test polls 就成功了 參考