Does a reverse sql inspector exist for django & postgres

北战南征 提交于 2019-12-13 05:24:23

问题


Does a reverse sql inspector exist for django & postgres? Something that shows you what is the origin of the sql view in django?

Something like this: https://github.com/rory/django-sql-inspector, but for postgres.

(Please let me know if you don't know of one, because hearing a handful of respectable peeps say they haven't is better than silence.)


回答1:


I can suggest django-sql-stacktrace, "github.com/adw0rd/django-sql-stacktrace";. Beside this django.backend.db logger that you can configure in the setting along with django.request logger to inspect the sql trace. Here there is a sample logging: configuration:docs.djangoproject.com/en/1.5/topics/logging/…. I hope this can be helpful.



来源:https://stackoverflow.com/questions/20305517/does-a-reverse-sql-inspector-exist-for-django-postgres

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!