1👍
✅
I needed to use one of the supported configurations as supported by the freetds driver. I ended up putting the host information in the odbc.ini. The linked documentation has good examples over a few pages.
0👍
Here’s an example of a database connection for SQL Server and django in case someone needs it, this is how it will look in the settings.py.
DATABASES = {
'default': {
'ENGINE': 'sql_server.pyodbc',
'NAME': 'YourDBname',
'USER': 'YourUsername',
'PASSWORD': '',
'HOST': '',
'OPTIONS' : {
'driver': 'SQL Native Client',
'dsn': 'YourDSNname',
'MARS_Connection': True,
},
},
}
Further information here…
- [Django]-How to populate database fields when model changes in django
- [Django]-Ignore_user_abort php simil in Django/python?
- [Django]-Django [Mezzanine CMS] project not deploying to Heroku
- [Django]-Django can not delete csrftoken after logout
- [Django]-Best way to incorporate external django app into a project and safely make local changes
Source:stackexchange.com