How can I see the raw SQL queries Django is running?

Clock
18.09.2024
An eye
17
Hearts
0
Connected dots
0
Connected dots
0

Make sure your Django DEBUG setting is set to True. Then import connection from django.db. connection.queries is only available if DEBUG is True. It’s a list of dictionaries in order of query execution. Each dictionary has the sql and time property.