. How do you determine at startup time if a piece of middleware should be used?

Others
  •  Raise MiddlewareNotUsed in the init function of your middleware.
  •  Implement the not_used method in your middleware class.
  •  List the middleware beneath an entry of django.middleware.IgnoredMiddleware.
  •  Write code to remove the middleware from the settings in [app]/init.py.

Leave a Reply

Your email address will not be published.