Django使用问题记录

1.python3下出现问题(首先安装pymysql与mysqlclient):
django.core.exceptions.ImproperlyConfigured: mysqlclient 1.3.13 or newer is required; you have 0.9.3.
解决方法:
在项目的__init__.py文件中添加如下内容:
import pymysql
pymysql.version_info = (1, 3, 13, "final", 0)
pymysql.install_as_MySQLdb()

 

参考内容:
a) https://blog.csdn.net/weixin_45476498/article/details/100098297
b) https://blog.csdn.net/lpw_cn/article/details/103978909

猜你喜欢

转载自www.cnblogs.com/jiguanghover/p/12325531.html