开发者

Django manager.py sql creates empty file

I'm trying to run my first Django application with sqlite3 database. W开发者_StackOverflow社区hen I run python manage.py sql my_app, it outputs the SQL queries, but the sqlite file is empty. What could be the reason?


That command just prints the sql statements. If you want to create the schema in the sqlite file, run:

python manage.py syncdb

If you are trying to export the sql statements to a text file:

python manage.py sql my_app > my_file.sql
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜