2👍
✅
Here is the documentation to turn on the raw sql logging:
It works like this:
>>> from django.db import connection
>>> connections.queries = []
>>> ..........execute a query............
>>> print connections.queries
Source:stackexchange.com