Middleware is a framework of hooks into Django’s request/response processing. It’s a light, low-level “plugin” system for globally altering Django’s input or output.

Python Docs

Middlewares must be registered in the Django's MIDDLEWARE_CLASSES setting.



Adds a X-API-Version header to the Django's response. In order to use this middleware, you should fill the API_VERSION key in the TOOLKIT setting.