
Django 4 By Example
By :

Figure 1.1 shows how Django processes requests and how the request/response cycle is managed with the different main Django components: URLs, views, models, and templates:
Figure 1.1: The Django architecture
This is how Django handles HTTP requests and generates responses:
We will get back to the Django request/response cycle at the end of this chapter in the The request/response cycle section.
Django also includes hooks in the request/response process, which are called middleware. Middleware has been intentionally left out of this diagram for the sake of simplicity. You will use middleware in different examples of this book, and you will learn how to create custom middleware in Chapter 17, Going Live.