【发布时间】:2017-02-19 01:39:29
【问题描述】:
我正在测试 django 项目以通过 ODBC 连接 Sql Server 数据库。
当我尝试运行我的项目时遇到一些问题
安装的组件有: 蟒蛇2.7 django 1.10.2 django-pyodbc 0.4.4
第一个错误是
文件“C:\Python27\lib\site-packages\django_pyodbc\introspection.py”,第 90 行, 在 get_table_list 中 return [TableInfo(row[0].lower(), row[1]) for row in cursor.fetchall()] NameError:未定义全局名称“TableInfo”
我试图纠正 ..\django-pyodbc\introspective.py 与
尝试: 从 django.db.backends.base.introspection 导入( BaseDatabaseIntrospection、FieldInfo、TableInfo、 )
而不是
尝试: 从 django.db.backends.base.introspection 导入 BaseDatabaseIntrospection
但我有第二个错误
文件“C:\Python27\lib\site-packages\django\db\backends\base\base.py”,第 604 行 , 在 schema_editor '这个数据库包装器的 SchemaEditorClass 属性仍然是 None') NotImplementedError:此数据库包装器的 SchemaEditorClass 属性是 还是没有
我不知道如何继续。
【问题讨论】:
标签: django django-pyodbc