下載頁面:https://postgresapp.com/downloads.html
偷懶一下直接放官方下載操作說明:
最後要記得設置環境變數!
下載頁面:https://www.pgadmin.org/download/

DATABASES = {
   'default': {
       'ENGINE':'django.db.backends.postgresql',
       'NAME':'quiz',
       'USER':'postgres',
       'PASSWORD':'pd',
       'HOST':'localhost',}
}
跑跑看runserver,如果成功代表設定上沒有什麼問題。
You have 17 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth, contenttypes, sessions.
Run 'python manage.py migrate' to apply them.
現在資料庫建好了,就可以來處理這個問題,執行python manage.py migrate把內建的app(admin, auth,    contenttypes sessions)需要的table放進資料庫裡。
4. 回到pgadmin,點選quiz⇢Schemas⇢Tables就可以看到新增的tables了。
資料庫的設定就先到這邊~