Middlewares

Article Content


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.

Adding Middleware

  1. Create file called middleware.py in your app folder.
  2. Define inside middleware.py your middleware class/function.
  3. Set settings.py to use your middleware by append to MIDDLEWARE :

MIDDLEWARE.append('yourapp.middlewares.your_middleware_name')
    

SubArticles


About

Added by dominik

Date: Dec. 5, 2017, 5:34 p.m.

Comments