我正在尝试将Django连接到远程Microsoft Server,但始终出现以下错误:
我已经安装了以下内容: Django的MSSQL pyodbc Django-pyodbc django-pyodbc-azure
django.core.exceptions.ImproperlyConfigured: 'sql_server.pyodbc' isn't an available database backend.
Try using 'django.db.backends.XXX', where XXX is one of:
'mysql', 'oracle', 'postgresql', 'sqlite3'
Error was: No module named 'sql_server'
DATABASES = {
'default': {
'ENGINE': 'sql_server.pyodbc',
'OPTIONS':{
"driver": "FreeTDS",
"extra_params": "tds_version=7.3",
},
'NAME': 'db_name',
'USER': 'user_name',
'PASSWORD': 'password',
'HOST': 'host_address',
'PORT': '1433'
}
}