]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/__init__.py
Fix OSQA-819: Link to profile in message is wrong if OSQA is installed in a subfolder
[osqa.git] / forum / __init__.py
index 8b137891791fe96927ad78e64b0aad7bded08bdc..fa60dba1d3f1cec275f057e83ae5c545f1bb4476 100644 (file)
@@ -1 +1,15 @@
+import threading
 
+
+class RequestHolder(object):
+    _requests = threading.local()
+
+    @property
+    def request(self):
+        return self._requests.request
+
+    @request.setter
+    def request(self, value):
+        self._requests.request = value
+
+REQUEST_HOLDER = RequestHolder()