6
I would also recommend including the following in options, to ensure Unicode results:
'OPTIONS': {
'host_is_server': True,
'autocommit': True,
'unicode_results': True,
'extra_params': 'tds_version=8.0'
},
The autocommit option is also necessary for Django 1.6. When you connect in this manner, it bypasses any DSNs you may have set up.
Edit: Django’s documentation for v1.6 reports “Since Django 1.6, autocommit is turned on by default”, so I guess you don’t need to set this
1
Turns out I had to specify the TDS version in the Django database settings as well:
'OPTIONS' : { 'host_is_server' : True, 'extra_params' : 'TDS_VERSION=8.0', }
I hope that helps someone.
- [Django]-Refresh a django subtemplate with javascript – reload only part of the page
- [Django]-Django Admin –Bulk Staff User Creation/Import from CSV file
- [Django]-Pip install confluent-kafka gives error in mac
Source:stackexchange.com