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

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.

heart
0
3 connected dots
0

Used in

In this article I will show how I implemented commenting on my website. Commenting, which is available to both anonymous and registered users.
Let me make a reservation right away that the authentication system that you and I will write is not based on the built-in Django application, django.contrib.auth. This will be a separate application with a separate model for it.
In this article, I will describe in detail how I solved the problem of server response delays to client requests. I will describe the operation of the ERR_HTTP2_PING_FAILED error and what steps I took to identify the problem.