Using the excellent Django-Devserver I\'m finding all kinds of interesting and unexpected SQL calls in my code. I wanted to find where the calls are coming from, and so I\'m
If you're in the shell, or anywhere for that matter, you can use the queryset method
query.as_sql()
to print the SQL command.
ie:
MyModel.objects.all().query.as_sql()