I'm currently trying to insert in a Django model some complex data extracted from multiple parsed files. Because I have a huge amount of data to insert I don't want to multiply the queries to the database from my Django script.
Is there a way to generate an SQL script instead of executing all the object_to_insert.save() and inserting the script by using psql -f my_script.sql ?