1. cannot import view
解決:項目名稱——右鍵——設為Sources root
2. cannot find templates
解決:在setting.py里把空的'DIRS’改成
'DIRS': [os.path.join(BASE_DIR,'templates')],
3. page not found
老師課上url路徑設置為path(r'^app01/',include('app01.urls'))祥山,當只有一個項目時可以運行圃验,然而多項目時報錯,此時需要把^都去掉缝呕。
4.社區(qū)版在tools里找不到run manage.py task
解決:運行項目,會報錯斧散,此處錯誤原因是Django項目版本與mysql驅動版本不匹配的問題供常,點鏈接進去把版本的兩行注釋掉,然后在settings.py里把項目名稱加進去鸡捐,運行python manage.py makemigrations以及python manage.py migrate
5. 社區(qū)版連接mysql出現(xiàn)報錯:The server time zone value '?D1ú±ê×?ê±??' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.
解決:
6. 雙擊表單選擇no filter就看到表單內容了栈暇。