It took me a while to figure it out, so I decided to share.
DATABASES = {
'default': {
'ENGINE': 'sqlany_django',
'USER': 'YOUR-USER',
'PASSWORD': 'YOUR-PASSWORD',
'OPTIONS': {
'links': 'tcpip(host=YOUR-DB-IP-OR-HOSTNAME;DoBroadcast=None)',
'ServerName': 'YOUR-SERVER-NAME',
},
}
}
For the sake of completeness, connecting via the regular DB API would be:
sqlanydb.connect(
links='tcpip(host=YOUR-SERVER-HOST;DoBroadcast=None)',
ServerName='YOUR-DB-NAME',
uid='YOUR-USER',
pwd='YOUR-PASSWORD'
)
It’s not hard – but tedious to tinker out.