/ Published in: Python
Useful when used with views
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
def print_queries(): from django.db import connections for connection in connections.all(): print "queries for %s:"%(connection.alias,) for i, query in enumerate(connection.queries): print "%s: %s"%(i, query)