简体   繁体   English

不能使用django-mssql提供程序

[英]Cannot use django-mssql provider

Does anyone know how to use the django-mssql provider? 有谁知道如何使用django-mssql提供程序? I've installed the requirements but I cannot get it to work. 我已经安装了要求,但我无法让它工作。

Without sqlserver_ado in settings.py it imports fine: 在settings.py中没有sqlserver_ado它导入正常:

(testenv) C:\Users\Robin\test>python manage.py shell
Python 2.7.2 (default, Jun 12 2011, 14:24:46) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> import sqlserver_ado
>>> ^Z

With a database set to use sqlserver_ado in settings.py: 使用数据库设置在settings.py中使用sqlserver_ado:

(testenv) C:\Users\Robin\test>python manage.py shell
ImproperlyConfigured: 'sqlserver_ado' isn't an available database backend.
Try using 'django.db.backends.XXX', where XXX is one of:
    u'mysql', u'oracle', u'postgresql_psycopg2', u'sqlite3'
Error was: cannot import name InterfaceError

EDIT: 编辑:

Django==1.5 django-mssql==1.5b1 Django == 1.5 django-mssql == 1.5b1

EDIT 2: 编辑2:

Browsing the source for django-mssql reveals that it's trying to import InterfaceError from django.db.utils which doesn't exist in Django 1.5 浏览django-mssql的源代码显示它正在尝试从Django 1.5中不存在的django.db.utils导入InterfaceError

It's mentioned on the project's Bitbucket page at https://bitbucket.org/Manfre/django-mssql/overview that: https://bitbucket.org/Manfre/django-mssql/overview项目的Bitbucket页面上提到:

"The current version of django-mssql supports Django 1.6. If using an older version of Django, you will need to use an earlier version of django-mssql. “当前版本的django-mssql支持Django 1.6。如果使用较旧版本的Django,则需要使用早期版本的django-mssql。

django-mssql 1.4 supports Django 1.4 and 1.5." django-mssql 1.4支持Django 1.4和1.5。“

I installed 1.4 and now I just need to get the provider working. 我安装了1.4,现在我只需要让提供商工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM