django模型的manage.py sql命令

编程入门 行业动态 更新时间:2024-10-25 18:27:04
本文介绍了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命令

本文发布于:2023-10-22 22:22:40,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1518902.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:模型   命令   django   manage   sql

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!