本文介绍了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命令
发布评论