Skip to content

How to display SQL QUERY before execute it #456

Answered by collerek
igormorgado asked this question in Q&A
Discussion options

You must be logged in to vote

Right now it's not possible in a clean way (unless databases have debug option, didn't check).
I will probably introduce one myself as for now in a need like this I revert to ugly printed 🤣

If you execute a select you can uncomment line 277 in queryset.py:

If you use prefetch_related same in prefetch_query line 506

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by igormorgado
Comment options

You must be logged in to vote
1 reply
@collerek
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants