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.