Not Logged In

django-pyodbc 0.2.7

django-pyodbc is a Django SQL Server DB backend powered by the pyodbc library. pyodbc is a mature, viable way to access SQL Server from Python in multiple platforms and is actively maintained. It’s also used by SQLAlchemy for SQL Server connections.

This is a fork of the original django-pyodbc, hosted on Google Code and last updated in 2011.

Features

Support for Django 1.4 and up.

Support for SQL Server 2000, 2005, 2008, and 2012 (please let us know if you have success running this backend with another version of SQL Server)

Native Unicode support. Every string that goes in is stored as Unicode, and every string that goes out of the database is returned as Unicode. No conversion to/from intermediate encodings takes place, so things like max_length in CharField works just like expected.

Boolean. Only relevant if using the FreeTDS ODBC driver under Unix/Linux.

By default, when using the FreeTDS ODBC driver the value specified in the HOST setting is used in a SERVERNAME ODBC connection string component instead of being used in a SERVER component; this means that this value should be the name of a dataserver definition present in the freetds.conf FreeTDS configuration file instead of a hostname or an IP address.

But if this option is present and it’s value is True, this special behavior is turned off.

String. Additional parameters for the ODBC connection. The format is
"param=value;param=value".

collation

String. Name of the collation to use when performing text field lookups against the database. For Chinese language you can set it to "Chinese_PRC_CI_AS". The default collation for the database will be used if no value is specified.

encoding

String. Encoding used to decode data from this database. Default is ‘utf-8’.

driver_needs_utf8

Boolean. Some drivers (FreeTDS, and other ODBC drivers?) don’t support Unicode yet, so SQL clauses’ encoding is forced to utf-8 for those cases.

If this option is not present, the value is guessed according to the driver set.