Django Request Life Cycle A web application or a website revolves around the request-response cycle and Django applications are no exception to this. But it is not just a two step process. Our Django applications needs to go through various stages to return the end user some result. To understand the Django framework better we must understand how the requests are initiated and the end result is served to the end user. When setting up a new Django project, one of the first things you’ll do is wire up your URLconfs and set up some views. But what’s actually happening under the hood here? How does Django route traffic to the view, and what part do middlewares play in this cycle? Layers of Django Application Request Middlewares URL Router(URL Dispatcher) Views Context Processors Template Renderers Response Middlewares Whenever a request comes in first it goes to the web server (Ngnix /Apache) . The the request goes to django's WSGI (Web Server Gateway Interface) / ASGI (Asynchr...