Question

I'm new to Django and I'm working on a project that requires SQL Server to be used. I've researched extensively on using Django with SQL Server, and it seems like django-pyodbc is the way to go. On the pydobc page, it mentions that only SQL Server 2000 and 2005 is supported. However, on other questions asked, it seems like 2008 is somewhat supported.

Is it possible at all to use Django with SQL Server 2012 on a Linux environment?

Please point me to the right direction! Thanks!

Was it helpful?

Solution

The top result on Google isn't the release you want to use; it hasn't been updated since 2011. Here's an active, updated repository which supports up to 2012 (and I will start testing 2014 soon):

https://github.com/lionheart/django-pyodbc/

Please let me know if you have any issues, and look through known issues; for example, when connecting, you'll need to include 'autocommit: true' in options:

'OPTIONS': {
    'host_is_server': True,
    'dsn': 'sql14-dev.example.com',
    'autocommit': True,
    'unicode_results': True,
    'extra_params': 'tds_version=7.2'
},
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top