-
Notifications
You must be signed in to change notification settings - Fork 130
Getting started
-
Install pyodbc 3.0 (or newer) and Django 2.2 (or newer)
-
Install django-mssql-backend ::
pip install django-mssql-backend
-
Set the
ENGINEsetting in the settings.py file used by your Django application or project to'mssql'module path ::'ENGINE': 'mssql'
-
Install pyodbc 3.0 (or newer) and Django 2.2 (or newer)
-
Install Microsoft ODBC Driver 17 for SQL Server (or equivalent)
-
Install django-mssql-backend ::
pip install django-mssql-backend -
Set the
ENGINEsetting in the settings.py file used by your Django application or project to'mssql'module path ::'ENGINE': 'mssql'
Here is an example of the database settings:
`DATABASES = { 'default': { 'ENGINE': 'sql_server.pyodbc', 'NAME': 'mydb', 'USER': 'user@myserver', 'PASSWORD': 'password', 'HOST': 'myserver.database.windows.net', 'PORT': '',
'OPTIONS': {
'driver': 'ODBC Driver 13 for SQL Server',
},
},
}
DATABASE_CONNECTION_POOLING = False`