練習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
就成功了
參考
2015年5月22日 星期五
2015年5月17日 星期日
2015年5月9日 星期六
2015年5月4日 星期一
A true SSLContext object is not available
在ubuntu server 14.04 裡安裝 psycopg2 出現了 A true SSLContext object is not available.,,,,參考 下了sudo apt-get install libffi-dev libssl-dev,再pip install psycopg2後 A true SSLContext object is not available 的訊息就不再出現了
訂閱:
文章 (Atom)