使用命令: python manage.py makemigrations
出现下面错误:
ImportError: cannot import name ‘COMMAND’ from ‘MySQLdb.constants’
把__init__.py文件中下面的以下代码注释:
import pymysql
pymysql.install_as_MySQLdb()
使用命令: python manage.py makemigrations
出现下面错误:
ImportError: cannot import name ‘COMMAND’ from ‘MySQLdb.constants’
把__init__.py文件中下面的以下代码注释:
import pymysql
pymysql.install_as_MySQLdb()