連接數據庫時報錯:
raise ImproperlyConfigured(
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module.
Did you install mysqlclient?
解決辦法:
pip install pymysql
然後在projectname/projectname/init.py裡面引入這個包
import pymysql
pymysql.install_as_MySQLdb()