1- =============
21django-pyodbc
32=============
43
5- A Django _ MS SQL Server external DB backend that uses ODBC by employing
6- the pyodbc _ library. It supports SQL Server 2000 and 2005.
7-
8- .. _Django : http://djangoproject.com/
9- .. _pyodbc : http://pyodbc.sourceforge.net
4+ A [ Django] ( http://djangoproject.com ) MS SQL Server external DB backend that
5+ uses ODBC by employing the [ pyodbc] ( http://pyodbc.sourceforge.net ) library. It
6+ supports SQL Server 2000 and 2005.
107
118Features
12- ========
9+ --------
1310
1411* Supports LIMIT+OFFSET and offset w/o LIMIT emulation under SS2005.
1512* Supports LIMIT+OFFSET under SS2000.
@@ -19,58 +16,54 @@ Features
1916 (Windows) and FreeTDS ODBC drivers (Linux).
2017
2118Dependencies
22- ============
19+ ------------
2320
2421* Django from SVN, revision 8328 or newer (1.0 is r8961.)
2522* pyodbc 2.0.58 or newer
2623
2724Installation
28- ============
25+ ------------
2926
30- 1. Install django-pyodbc.::
27+ 1 . Install django-pyodbc.
3128
3229 pip install django-pyodbc
3330
34- 2. Now you can now add a database to your settings using standard ODBC parameters.::
35-
36- DATABASES = {
37- 'default': {
38- 'ENGINE ': "django_pyodbc",
39- 'HOST ': "127.0.0.1,1433 ",
40- 'USER ': "mssql_user ",
41- 'PASSWORD ': "mssql_password ",
42- 'NAME ': "database_name ",
43- 'OPTIONS ': {
44- 'host_is_server ': True
45- },
46- }
31+ 2 . Now you can now add a database to your settings using standard ODBC parameters.
32+
33+ ``` python
34+ DATABASES = {
35+ ' default ' : {
36+ ' ENGINE ' : " django_pyodbc " ,
37+ ' HOST ' : " 127.0.0.1,1433 " ,
38+ ' USER ' : " mssql_user " ,
39+ ' PASSWORD ' : " mssql_password " ,
40+ ' NAME ' : " database_name " ,
41+ ' OPTIONS ' : {
42+ ' host_is_server ' : True
43+ },
4744 }
45+ }
46+ ```
4847
49483 . That' s all!
5049
5150Configuration
52- =============
51+ ------------ -
5352
5453The following settings control the behavior of the backend:
5554
56- Standard Django settings
57- ------------------------
55+ # ## Standard Django settings
5856
59- ``NAME ``
60- String. Database name. Required.
57+ `NAME ` String. Database name. Required.
6158
62- ``HOST ``
63- String. SQL Server instance in ``server\instance `` or ``ip,port `` format.
59+ `HOST ` String. SQL Server instance in `server\instance` or `ip,port` format.
6460
65- ``USER ``
66- String. Database user name. If not given then MS Integrated Security will
67- be used.
61+ `USER ` String. Database user name. If not given then MS Integrated Security
62+ will be used.
6863
69- ``PASSWORD ``
70- String. Database user password.
64+ `PASSWORD ` String. Database user password.
7165
72- ``OPTIONS ``
73- Dictionary. Current available keys are:
66+ `OPTIONS ` Dictionary. Current available keys are:
7467
7568 `` autocommit``
7669 Boolean. Indicates if pyodbc should direct the the ODBC driver to
0 commit comments