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

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

Answer: The correct answer of the above question is Option A:Raise MiddlewareNotUsed in the **init** function of your middleware.