Grokking Django
0% completed
Introduction to Middleware in Django
Every request to a Django project passes through a short list of classes before any view runs, and the response passes back through the same classes on its way to the browser. Each class in that list can read the request, change it, answer it directly, or change the response. Django calls these classes middleware, and the list lives in the MIDDLEWARE setting.
This chapter covers two tools that act on many requests at once. Middleware runs shared logic for every request, and the caching framework, in the two lessons after this one, saves finished work so that later requests can reuse it.
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%