django 迁移数据库报错

django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module.
Did you install mysqlclient?

解决方案:在settings.py同级目录中的__init__.py文件中加入:

import pymysql
pymysql.install_as_MySQLdb()

相关文章:

  • 2021-06-05
  • 2022-03-03
  • 2021-10-21
  • 2021-05-16
  • 2021-04-21
  • 2022-12-23
  • 2021-11-19
  • 2021-06-13
猜你喜欢
  • 2022-12-23
  • 2021-10-21
  • 2021-11-03
  • 2022-12-23
  • 2022-03-02
  • 2021-08-23
  • 2021-11-20
相关资源
相似解决方案