The request/response cycle - a Djangonautic journey
06-04, 15:05–15:50 (Europe/Paris), Main Room

A Django-layer-focused look at the classic interview question: "what happens when you click a link?". From the initial call to the request handler, through to what it finally returns; a deep dive into Django's handlers and middleware.


How exactly do web-servers communicate with Django? and what happens immediately after that? If you've ever wondered where the request object comes from? How the middleware-chain is put together? Or just what all those functions you see in your exception tracebacks do? Then join me in a deep dive of everything between the server, the view and back again, as we answer these questions and more.

This talk will be a look under the hood at Django's request handlers, middleware-chain and URL-resolvers. Focusing on just the WSGI route (not asynchronous), it aims to be accessible to beginners, but with the intention that a more experienced user will learn something new or interesting as well.

We will start off by replacing Django's WSGIHandler with our own "hello world" WSGI application. We'll then build back in additional features until it starts to resemble what we originally had. Along the way, we'll highlight lesser-known features, and give examples demonstrating how understanding the implementation will enable you to better take advantage of the features Django offers, and ultimately write better code.

See also: Slides for the talk (2.7 MB)

A reformed maths Teacher - Tim McCurrach made the leap from the class-room to developing full-time back in 2019 and hasn't looked back since. A Django aficionado and contributor, he currently spends most of his time building the software he wished he had back when he taught. When not coding he enjoys running, climbing, maths problems and board games.