I have got following in my django env
Django==1.8.1
django-mssql==1.6.2
django-pyodbc==0.2.8
pyodbc==3.0.10
pywin32==219
sql-server.pyodbc==1.0
and the following in my settings.py
DATABASES = {
'default': {
'NAME': 'db_name',
'ENGINE': 'sqlserver_ado',
'HOST': 'host_name\\SQLEXPRESS',
'USER': 'user_name',
'PASSWORD': 'password',
}
}
But when I try to migrate it I face the following error. Am I missing out something?
django.core.exceptions.ImproperlyConfigured: 'sqlserver_ado' isn't an available database backend.
Try using 'django.db.backends.XXX', where XXX is one of:
'base', 'mysql', 'oracle', 'postgresql_psycopg2', 'sqlite3'
Error was: cannot import name 'BaseDatabaseWrapper'
I had been using django 1.8, and solved it by downgrading to django 1.6. These are the libraries installed in my virtualenv after the downgrade, and when I got it working.:
(env)$ pip list
argparse (1.2.1)
Django (1.6)
django-pyodbc (0.2.8)
pip (1.5.4)
pyodbc (3.0.10)
setuptools (2.2)
wsgiref (0.1.2)
You need to install the python package django-sqlserver.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With