Does anyone know how to use the django-mssql provider? I've installed the requirements but I cannot get it to work.
Without sqlserver_ado in settings.py it imports fine:
(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:
(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
EDIT 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
It's mentioned on the project's Bitbucket page at https://bitbucket.org/Manfre/django-mssql/overview that:
"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 1.4 supports Django 1.4 and 1.5."
I installed 1.4 and now I just need to get the provider working.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.