Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #13101 -- Added multi-db info about debugging queries. Thanks t…

…o David Fischer for the patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@13156 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit ec136cee250cf86f5e67aa4b6fac46c242253299 1 parent ccf5bb1
Russell Keith-Magee authored May 09, 2010

Showing 1 changed file with 9 additions and 1 deletion. Show diff stats Hide diff stats

  1. 10  docs/faq/models.txt
10  docs/faq/models.txt
@@ -25,9 +25,17 @@ of dictionaries in order of query execution. Each dictionary has the following::
25 25
 ``connection.queries`` includes all SQL statements -- INSERTs, UPDATES,
26 26
 SELECTs, etc. Each time your app hits the database, the query will be recorded.
27 27
 Note that the raw SQL logged in ``connection.queries`` may not include
28  
-parameter quoting.  Parameter quoting is performed by the database-specific 
  28
+parameter quoting.  Parameter quoting is performed by the database-specific
29 29
 backend, and not all backends provide a way to retrieve the SQL after quoting.
30 30
 
  31
+.. versionadded:: 1.2
  32
+
  33
+If you are using :ref:`multiple databases<topics-db-multi-db>`, you can use the
  34
+same interface on each member of the ``connections`` dictionary::
  35
+
  36
+    >>> from django.db import connections
  37
+    >>> connections['my_db_alias'].queries
  38
+
31 39
 Can I use Django with a pre-existing database?
32 40
 ----------------------------------------------
33 41
 

0 notes on commit ec136ce

Please sign in to comment.
Something went wrong with that request. Please try again.