开发者

How to print mysql statements executed / to be executed on a statement in django?

开发者 https://www.devze.com 2023-01-05 04:31 出处:网络
I want want to examine what django does with databse when I execute some statement with a django model

I want want to examine what django does with databse when I execute some statement with a django model

For instance

Group.members.all()

with manage.py shell.

Is th开发者_开发知识库ere any way of doing this?


You can use the Django Debug Toolbar.

  • Introducing the Django Debug Toolbar
  • django-debug-toolbar (github)


print Group.members.all().query
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号