1.APP未注册
INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'crm', #这里未注册会报错:ImportError: No module named ‘MySQLdb' ]
2.对应项目下:__init__.py
import pymysql pymysql.install_as_MySQLdb()