ThreadLocalsMiddleware¶ Qualified name: intranet.middleware.threadlocals.ThreadLocalsMiddleware class intranet.middleware.threadlocals.ThreadLocalsMiddleware(get_response)[source]¶ Bases: object Stores the current authorized User object in thread locals for access in models (and elsewhere) without passing the user around as an argument. Methods process_view Adds the request to thread locals. __init__(get_response)[source]¶ static process_view(req, *_)[source]¶ Adds the request to thread locals.