Author: russellm
Date: 2010-05-08 23:50:48 -0500 (Sat, 08 May 2010)
New Revision: 13156

Modified:
   django/trunk/docs/faq/models.txt
Log:
Fixed #13101 -- Added multi-db info about debugging queries. Thanks to David 
Fischer for the patch.

Modified: django/trunk/docs/faq/models.txt
===================================================================
--- django/trunk/docs/faq/models.txt    2010-05-09 04:50:00 UTC (rev 13155)
+++ django/trunk/docs/faq/models.txt    2010-05-09 04:50:48 UTC (rev 13156)
@@ -25,9 +25,17 @@
 ``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?
 ----------------------------------------------
 

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to