X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/3445a2c9a7e7b263f27f89412a42a73d6d240035..d51fb54019701a24740c85e85024de1fce7b0689:/forum/middleware/request_utils.py diff --git a/forum/middleware/request_utils.py b/forum/middleware/request_utils.py index e3b5bc2..e90d3c5 100644 --- a/forum/middleware/request_utils.py +++ b/forum/middleware/request_utils.py @@ -1,7 +1,11 @@ +import forum + from forum.settings import MAINTAINANCE_MODE, APP_LOGO, APP_TITLE from forum.http_responses import HttpResponseServiceUnavailable + + class RequestUtils(object): def process_request(self, request): if MAINTAINANCE_MODE.value is not None and isinstance(MAINTAINANCE_MODE.value.get('allow_ips', None), list): @@ -15,4 +19,10 @@ class RequestUtils(object): request.META['REQUEST_METHOD'] = "POST" self.request = request - return None \ No newline at end of file + forum.REQUEST_HOLDER.request = request + return None + + def process_response(selfself, request, response): + forum.REQUEST_HOLDER.request = None + return response +