Posts

Showing posts from December, 2012

Sql statement for a query with the Django ORM?

from django.db import connection

sql_statement = connection.queries.pop()

print sql_statement['sql']