连接数据库时报错:
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()