connector/python——django1.6

=、=

在connector/python 和django1.6结合使用的时候会出翔...

在进入django的admin时,报错...

类似于...Nonetype has no attribute converter ...

这个和python版本没有关系...试了2.7和 3.3版本的都一样...

最后查到说是它本身的问题...也不知道是不是...反正蛋疼...

现在改成PyMySQL...一下子就搞定了...

安装PyMySQL也很简单...

https://github.com/PyMySQL/PyMySQL

下载好PyMySQL后直接进入目录运行setup.py

此时可能出现no module named setuptools的问题...

按照https://pypi.python.org/pypi/setuptools里面说的来安装...

安装好PyMySQL后,要在django中使用的话,需要在__init__.py中添加:

import pymysql
pymysql.install_as_MySQLdb()

...................................一入bug深似海...坚决和bug奋战到底.........................

原文地址:https://www.cnblogs.com/lazyzhong/p/3504496.html