django模型的manage.py sql命令 - Django [英] manage.py sql command for django models - Django

查看:152
本文介绍了django模型的manage.py sql命令 - Django的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

只是想知道...但是是否可以为django的模型生成SQL命令?

just wondering... but is it possible to generate SQL commands for django's models?

会话模型

python manage.py sql django






任何想法?


Any ideas?

推荐答案

您需要提及django附带的特定应用程序的名称,例如

You need to mention the name of the specific app that comes with django, such as

 python manage.py sql auth
 python manage.py sql admin

我觉得有点笨拙,你不能完全-qualified名字(如django.contrib.auth),但只使用名称的最后一部分似乎工作正常。

I find it a bit clumsy that you can't give fully-qualified names (such as django.contrib.auth), but using just the last part of the name seems to work fine.

这篇关于django模型的manage.py sql命令 - Django的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆