[If you] take a peek under the hood, your impression of Django will change dramatically:
The code is awful.
[Django’s] got a terrific story if you’re willing to drink the kool-aid (basically it’s Django’s way or the high way and you shouldn’t make any friends outside the circle of trust).
What I don’t understand is how so many people can keep the secret that the code is an outright horror. I sort of knew that it had to be, but I was in for a surprise.
The short story is that shouldn’t try to use Django from the inside; it’s a pile of spaghetti with insane indirection and module dependencies and you’re lucky if you manage to import anything at all. Every other function tries to import modules for you automatically and circular imports are the norm. It’s all driven by convenience and convention, but if you’re coming with your own expectations about how a system should or could work, you’ll face only inconvenience and odd conventions.
I’ve occasionally delved into Django’s sources. I thought it was pretty good code, although my forays were limited, and mostly in the forms code.
The comments are a very good read. Worth taking a look.