Commits

Michael Manfre committed eaf3d9a

Added docs about running the Django test suite and cross links to settings.

Comments (0)

Files changed (4)

docs/quickstart.txt

     pip install django-mssql
 
 
-* Add the DATABASES configuration.
+* Add the :setting:`DATABASES` configuration.
 
     .. code-block:: django
     

docs/settings.txt

+========
 Settings
 ========
 
+.. setting:: DATABASES
+
 DATABASES
 ---------
 
     }
 
 
+.. setting:: ENGINE
+
 ENGINE
 ~~~~~~
 
 This value must be set to ``sqlserver_ado``.
 
+.. setting:: HOST
+
 HOST
 ~~~~
 
 This defines the Microsoft SQL Server to establish a connection. This value 
 can be a hostname or IP address.
 
+.. setting:: PORT
+
 PORT
 ~~~~
 
 This defines the network port to use when connecting to the server. If not 
 defined, the standard Microsoft SQL Server port will be used.
 
+.. setting:: NAME
+
 NAME
 ~~~~
 
 This is the name of the SQL server database.
 
+.. setting:: USER
+
 USER
 ~~~~
 
 This defines the name of the user to use when authenticating to the server.
 When empty, a trusted connection (SSPI) will be used.
 
+.. setting:: PASSWORD
+
 PASSWORD
 ~~~~~~~~
 
     will be able to see the plain-text password. Trusted connections are 
     recommended.
 
+.. setting:: OPTIONS
+
 OPTIONS
 -------
 
 keys, the ``OPTIONS`` dictionary keys are expected to be lowercase (due to
 legacy reasons).
 
+.. setting:: use_mars
+
 use_mars
 ~~~~~~~~
 
 
 .. _`extra_params`: OPTIONS-EXTRA_PARAMS
 
+.. setting:: extra_params
+
 extra_params
 ~~~~~~~~~~~~
 
 provide any specific connection settings that are not controllable with the
 other settings.
 
+.. setting:: provider
+
 provider
 ~~~~~~~~
 
     "Cannot create new connection because in manual or distributed transaction mode."
     if you try to filter a queryset with another queryset.
 
+.. setting:: disable_avg_cast
 
 disable_avg_cast
 ~~~~~~~~~~~~~~~~
     
 - set up the SQLINSTANCE
 - ``python manage.py test``
+
+Running Django Test Suite
+~~~~~~~~~~~~~~~~~~~~~~~~~
+
+To `run the Django test suite`_, you will need to create a settings file that lists 
+'sqlserver_ado' as the :setting:`ENGINE`.
+
+Example settings:
+
+    .. code-block:: python
+    
+        DATABASES = {
+            'default': {
+                'ENGINE': 'sqlserver_ado',
+                'NAME': 'django_framework',
+                'HOST': r'localhost\ss2008',
+                'USER': '',
+                'PASSWORD': '',
+            },
+            'other': {
+                'ENGINE': 'sqlserver_ado',
+                'NAME': 'django_framework_other',
+                'HOST': r'localhost\ss2008',
+                'USER': '',
+                'PASSWORD': '',
+            }
+        }
+        
+        SECRET_KEY = "django_tests_secret_key"
+
+
+.. _`run the Django test suite`: https://docs.djangoproject.com/en/dev/internals/contributing/writing-code/unit-tests/
 
         sproc_params = [1, 2, 3]
         MyModel.objects.raw_callproc('uspGetMyModels', sproc_params)
+
+.. versionadded:: 1.2