I\'m trying to connect my Django app to SQL Server 2016. I\'ve tried using django-pyodbc but it doesn\'t support Django 1.11. Instead I installed django-mssql 1.8. When I try to
You can use django-pyodbc-azure because it has support up to current versions of django 2.0. After installation you need to edit in your settings file like below:
DATABASES = {
'default': {
'ENGINE': 'sql_server.pyodbc',
'NAME': DB_NAME,
'USER': USER,
'PASSWORD': PASSWORD,
'HOST': HOST,
'PORT': PORT,
'OPTIONS': {
'driver': 'ODBC Driver 13 for SQL Server',
'unicode_results': True,
},
}
}
If you install TDS library as driver then your driver will be 'driver':'Free TDS' Here 13 is the default version. If your installed version is different from that then use that version number instead of 13