How to see the generated SQL statements when running Django.server configuration

Answered

I'm troubleshooting a Django project, and it runs in PyCharm IDE as a Django.server configuration.

I suspect a class of admin.ModelAdmin has low-efficient inlines, and want to see the SQL statements generated by Django as the application runs and proceeds with testing operation.

Inputs will be highly appreciated, and let me know if you need more information. Thank you.

0
2 comments
Avatar
Permanently deleted user

Sergey Karpov Thank you for the reply. Yes, you're right.

Show SQL is not a PyCharm specific feature, and I was able to make it work by modifying source code following the link below:

https://stackoverflow.com/questions/4375784/log-all-sql-queries

 

0

Please sign in to leave a comment.