Django: show/log ORM sql calls from python shell - Stack Overflow
qs = YourModel.objects.all()qs.query.get_compiler('default').as_sql()