插件:django-extensions

django-extensions==1.9.8

pip3 install  django-extensions

1.数据库shell 命令(项目目录下)

  python3 manage.py dbshell

  执行sql语句

2.查看django orm对应的sql语句

  https://www.jianshu.com/p/9ac4ca98b8e4 

  python manage.py shell_plus --print-sql

  在此Shell中你通过Django对数据库执行的所有操作都会自动打印出其对应的SQL语句.

 

相关文章:

  • 2021-12-23
  • 2021-09-25
  • 2021-11-01
  • 2021-12-06
  • 2021-12-05
  • 2021-08-26
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-23
  • 2021-07-19
  • 2021-05-03
相关资源
相似解决方案