Python:sql_for_inline_foreign_key_references() takes 4 positional arguments but 5 were given

相关版本:Python3.3    Django1.6  使用MySql官方中间件 mysql-connector-python-1.1.4-py3.3

报错:Python:sql_for_inline_foreign_key_references() takes 4 positional arguments but 5 were given


解决办法:

C:\Python33\Lib\site-packages\mysql\connector\django

在这个文件夹下找到:creation.py

修改方法: sql_for_inline_foreign_key_references为:只修改方法参数即可

def sql_for_inline_foreign_key_references(self, model, field, known_models, style):



你可能感兴趣的:(Python)