summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2010-05-09 04:50:48 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2010-05-09 04:50:48 +0000
commitec136cee250cf86f5e67aa4b6fac46c242253299 (patch)
tree9b70753e432ec37b015255c42221ca8702ac4166 /docs
parentccf5bb188334fe36b436562025e38abda155aacf (diff)
Fixed #13101 -- Added multi-db info about debugging queries. Thanks to David Fischer for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13156 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
-rw-r--r--docs/faq/models.txt10
1 files changed, 9 insertions, 1 deletions
diff --git a/docs/faq/models.txt b/docs/faq/models.txt
index 42c7d5bc3c..2732c0b8e1 100644
--- a/docs/faq/models.txt
+++ b/docs/faq/models.txt
@@ -25,9 +25,17 @@ of dictionaries in order of query execution. Each dictionary has the following::
``connection.queries`` includes all SQL statements -- INSERTs, UPDATES,
SELECTs, etc. Each time your app hits the database, the query will be recorded.
Note that the raw SQL logged in ``connection.queries`` may not include
-parameter quoting. Parameter quoting is performed by the database-specific
+parameter quoting. Parameter quoting is performed by the database-specific
backend, and not all backends provide a way to retrieve the SQL after quoting.
+.. versionadded:: 1.2
+
+If you are using :ref:`multiple databases<topics-db-multi-db>`, you can use the
+same interface on each member of the ``connections`` dictionary::
+
+ >>> from django.db import connections
+ >>> connections['my_db_alias'].queries
+
Can I use Django with a pre-existing database?
----------------------------------------------