django 问题汇总

1.MySQLclient目前只支持到python3.4,因此如果使用的更高版本的python,可以修改下面路径的文件(即python的安装路径):

...\Python3.6\Lib\site-packages\django\db\backends\mysql\base.py

注释下面代码
if version < (1, 3, 3):
  raise ImproperlyConfigured("mysqlclient 1.3.3 or newer is required; you have %s" % Database.__version__)

2. query = query.decode(errors='replace') AttributeError: 'str' object has no attribute 'decode'

...\Python3.6\Lib\site-packages\django\db\backends\mysql\ operations.py
解决办法:打开此文件把146行的decode修改为encode

你可能感兴趣的:(django 问题汇总)