views:

2045

answers:

4

Has anybody got recent experience with deploying a Django application with an SQL Server database back end? Our workplace is heavily invested in SQL Server and will not support Django if there isn't a sufficiently developed back end for it.

I'm aware of mssql.django-pyodbc and django-mssql as unofficially supported back ends. Both projects seem to have only one person contributing which is a bit of a worry though the contributions seem to be somewhat regular.

Are there any other back ends for SQL Server that are well supported? Are the two I mentioned here 'good enough' for production? What are your experiences?

+1  A: 

Haven't used it in production yet, but my initial experiences with django-mssql have been pretty solid. All you need are the Python Win32 extensions and to get the sqlserver_ado module onto your Python path. From there, you just use sql_server.pyodbc as your DATABASE_ENGINE. So far I haven't noticed anything missing, but I haven't fully banged on it yet either.

tghw
+2  A: 

We are using django-mssql in production at our company. We too had an existing system using mssql. For me personally it was the best design decision I have ever made because my productivity increased dramatically now that I can use django .

I submitted a patch but when I started using django-mssql and did a week or two of testing.Since then (October 2008) we run our system on django and it runs solid. I also tried pyodbc but I did not like to much.

We are running a repair system where all transactions run through this system 40 heavy users. If you have more questions let me know.

Paul
Is django-mssql tied to a particular version of django?
Josh Smeaton
django-mssql requires django to be run on Windows. What to do if one is running django on Linux?
PythonUser
+6  A: 

As has been stated, django-pyodbc is a good way to go. PyODBC is probably the most mature SQL Server library for Python there is.

The only thing you may have problems with is that pyodbc doesn't support stored procedures very well (you can call them, but you have no way to get results from them). You can call them using pymssql, but I would avoid it if at all possible as it doesn't support the standard DB-API interface and may be subject to changes. If you need to do this, your best bet is to use adodbapi directly (it's included with the python win32 package, which you'll probably end up installing anyway).

Jason Baker
A: 

Does this mean that using sql-server is only feasible in a Windows <-> Windows set up ? I mean ... It seems that all answers are mentionning that it is either not fully functionnal (no possibility to read return values from SP) or no fully stable.

As the last post dates from May 2009, can people bring updates on this ?

\T,

Thomas
The django-pyodbc project seeks to create an adapter built on top of pyodbc which will work from Windows or Linux. Django-pyodbc works fairly well, but it is not as rock solid as the 4 supported django database adapters. Stored procedures are not supported from django anyway.http://code.google.com/p/pyodbchttp://code.google.com/p/django-pyodbc/
davidfischer