开发者

How to use django's manage.py sql* commands with mysql

How are the sql* commands meant to be used? They just output sql, so is there an elegant way to pass it to mysql? ./manage.py sqlindexes [app] gives me the mysql code - do I j开发者_如何转开发ust note it down and then type it in? (edit: erm...copy and paste for others. heh.)

Pardon my ignorance, and please let me know if there's a completely different but better way of using it.


Pipe it to the dbshell command like so:

python manage.py sqlindexes my_app | python manage.py dbshell
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜