Re:Python at Scale: Strict Modules
by heavenlyblue on Sunday October 20, 2019 @07:09PM
(#21307959)
You can import Django models before calling setup, you will simply not be able to use the database before calling setup.
In practice, this means that any script that depends indirectly on Django code will incur a lengthy startup cost (from having to call setup()), and will fail to run if there's no database connection, even if the script itself doesn't need the db.