Django run sql query on the command line

Run SQL query using Django database settings. Pipe commands to dbshell (PostgreSQL, MySQL, SQLite, Oracle).

cat ~/query.sql | python manage.py dbshell

Comments

Leave a Reply