# Django Internals > How Django works from the inside: the hidden machinery underneath the framework's promises, verified against Django 6.1.3 and measured on one running application. Describes Django 6.1.3 (f16e25dcb9fe55734ba4ea2b00ac34405b7df74a): every backticked name exists in Django's source at the pinned commit, and every `path:Symbol` pointer resolves by AST to its exact lines. Every link below points to the page's markdown twin; drop `.md` for the rendered HTML. Data index: https://djangointernals.dev/index.json. Reverse symbol index: https://djangointernals.dev/names.json. ## 2. Handlers, middleware, and async - [Handlers, middleware, and async](https://djangointernals.dev/handlers.md): A `WSGIHandler` or `ASGIHandler` turns a flat list of middleware strings into a nested chain of callables around the view, trapping exceptions at every layer and bridging sync and async across threads. ## 6. QuerySets and laziness - [QuerySets and laziness](https://djangointernals.dev/querysets.md): A `QuerySet` is an unexecuted query description until something demands rows; chaining copies the description without touching the database, and the first evaluation fills an in-memory result cache that subsequent reads silently reuse. - [Laziness and the result cache](https://djangointernals.dev/querysets/caching.md): When does a `QuerySet` actually talk to the database, what does it store once the rows arrive, and why can one extra attribute read inside a loop multiply your SQL queries by the number of rows? ## 9. Templates and forms - [Templates and forms](https://djangointernals.dev/presentation.md): Django compiles template source once into a tree of node objects backed by a stacked `RenderContext` with automatic HTML escaping, while forms run a deterministic three-stage cleaning pipeline that binds raw strings to typed Python values. ## 13. Where Django leaks - [Where Django leaks](https://djangointernals.dev/leaks.md): The full measured latency and query ladder of a single endpoint, the failure modes that cross layer boundaries in production, and the sharp Django 6.x shifts that trip up older mental models.