首页 > 其他 > 详细

Django使用ORM遇到的问题

时间:2019-05-09 21:54:27      阅读:150      评论:0      收藏:0      [点我收藏+]

问题1;mysqlclient 1.3.13 or newer is required; you have 0.9.3.

django.core.exceptions.ImproperlyConfigured: mysqlclient 1.3.13 or newer is required; you have 0.9.3.

技术分享图片

解决方法:

1)进入D:\Programs\Python\Python37\Lib\site-packages\django\db\backends\mysql\base.py注释35-36两行

技术分享图片


问题2;AttributeError: ‘str‘ object has no attribute ‘decode‘

AttributeError: ‘str‘ object has no attribute ‘decode‘

技术分享图片

解决方法:

1)进入D:\Programs\Python\Python37\Lib\site-packages\django\db\backends\mysql\operations.py

修改146行,把decode修改为encode

技术分享图片

 

Django使用ORM遇到的问题

原文:https://www.cnblogs.com/ygzy/p/10841289.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!