Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

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

…o David Fischer for the patch.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit ec136cee250cf86f5e67aa4b6fac46c242253299 1 parent ccf5bb1
@freakboy3742 freakboy3742 authored
Showing with 9 additions and 1 deletion.
  1. +9 −1 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::
``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?

0 comments on commit ec136ce

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