What if I'm importing 100 things ? (In the top of my views.py)
开发者_如何学编程And then inside each of them, I'm importing 30 things.
Will that slow things down?
It will slow down startup (actually, whatever loads the file containing those imports the first time will be slowed down). Assuming django does not do that for every request but only once, it is not an issue at all.
Only the first time they're imported in the process. After that, all that happens is that a reference is copied to the local scope.
精彩评论