[Answered ]-Viewing mysql logs in django

2👍

Here is the documentation to turn on the raw sql logging:

https://docs.djangoproject.com/en/1.2/faq/models/#how-can-i-see-the-raw-sql-queries-django-is-running

It works like this:

>>> from django.db import connection    
>>> connections.queries = []
>>> ..........execute a query............
>>> print connections.queries

Leave a comment