0 votes
in Data Handling by
Explain the use of Middlewares in Django.

1 Answer

0 votes
by

Middleware is a framework that is light and low-level plugin system for altering Django’s input and output globally. It is basically a framework of hooks into the request/ response processing of Django. Each component in middleware has some particular task. For example, the AuthenticationMiddleware is used to associate users with requests using sessions. Django provides many other middlewares such as cache middleware to enable site-wide cache, common middleware that performs many tasks such as forbidding access to user agents, URL rewriting, etc, GZip middleware which is used to compress the content for browsers, etc.

Related questions

0 votes
asked Apr 3, 2020 in Data Handling by amita rallin
0 votes
asked Apr 3, 2020 in Data Handling by amita rallin
...