News for hackers. Stuff that matters.
Re:Python at Scale: Strict Modules by yen223 on Sunday October 20, 2019 @06:15PM (#21307596)
Without calling setup, you cannot import anything that touches Django models, like constants defined in a file that transitively imports a Django model.

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.

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.