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
精彩评论