]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/__init__.py
Replace deprecated mimetype with content_type
[osqa.git] / forum / __init__.py
index 51c0c431c26bb68ed2ccf20fd1374e6a2239938d..fa60dba1d3f1cec275f057e83ae5c545f1bb4476 100644 (file)
@@ -1,5 +1,15 @@
+import threading
+
+
 class RequestHolder(object):
-    def __init__(self):
-        self.request = None
+    _requests = threading.local()
+
+    @property
+    def request(self):
+        return self._requests.request
+
+    @request.setter
+    def request(self, value):
+        self._requests.request = value
 
-REQUEST_HOLDER = RequestHolder()
\ No newline at end of file
+REQUEST_HOLDER = RequestHolder()