Forums

connecting Django application with Remote Sql server database through public ip address

hello

i have a simple django application and want to connect to remote sql server database through public ip

here is my django connecting settings

enteDATABASES = {
"default": {
    "ENGINE": "mssql",
    "NAME": "it_inventory",
    "USER": "",
    "PASSWORD": "",
    "HOST": "MOHACODES",
    "PORT": "",
    "OPTIONS": {"driver": "ODBC Driver 17 for SQL Server", 
    },
},

}

and am using mssql-django==1.1.3

i tried it on my laptop and it works, but on the pythonanywhere server am getting an error.

[01000] [unixODBC][Driver Manager]Can't open lib 'ODBC Driver 17 for SQL Server'

See https://help.pythonanywhere.com/pages/MSSQLServer/