I know that in order to see the generated SQL statement for queries I could use the .query function (e.g. str(Model.objects.all().query), or same with
.query
str(Model.objects.all().query)