]> 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 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..fa60dba1d3f1cec275f057e83ae5c545f1bb4476 100644 (file)
@@ -0,0 +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()