]> git.openstreetmap.org Git - osqa.git/commitdiff
Merge branch 'threadsafe_requestholder' into update_django
authorAttila-Mihaly Balazs <dify.ltd@gmail.com>
Thu, 16 Jan 2014 10:05:25 +0000 (12:05 +0200)
committerAttila-Mihaly Balazs <dify.ltd@gmail.com>
Thu, 16 Jan 2014 10:05:25 +0000 (12:05 +0200)
.gitignore [new file with mode: 0644]
README [new file with mode: 0644]
forum/__init__.py
forum/settings/faq.py
requirements.txt [new file with mode: 0644]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..7b7b758
--- /dev/null
@@ -0,0 +1,9 @@
+*.pyc
+.pydevproject
+.settings
+.project
+log/django.osqa.log
+tmp/*
+
+osqa.wsgi
+settings_local.py
diff --git a/README b/README
new file mode 100644 (file)
index 0000000..554535d
--- /dev/null
+++ b/README
@@ -0,0 +1,7 @@
+The OSQA project - open source Q&A system
+
+Project Q&A site - http://meta.osqa.net
+Homepage - http://www.osqa.net
+Bug tracking - http://jira.osqa.net
+Wiki - http://wiki.osqa.net
+
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()
index 16377f68712419dcc57f7ec3b470e0cbb5e2c34a..7dbbe4b2521e56433f611a78abefe3bae79f0063 100644 (file)
@@ -1,7 +1,8 @@
 from base import Setting, SettingSet
 from django.forms.widgets import Textarea
+from django.utils.translation import ugettext_lazy as _
 
-FAQ_SET = SettingSet('faq', 'FAQ page', "Define the text in the about page. You can use markdown and some basic html tags.", 2000, True)
+FAQ_SET = SettingSet('faq', _('FAQ page'), _("Define the text in the about page. You can use markdown and some basic html tags."), 2000, True)
 
 FAQ_PAGE_TEXT = Setting('FAQ_PAGE_TEXT',
 u"""
@@ -74,6 +75,6 @@ Allowing experienced members of this community to curate the questions and answe
 
 Please ask your question, help make our community better!
 """, FAQ_SET, dict(
-label = "FAQ page text",
-help_text = " The faq page. ",
+label = _("FAQ page text"),
+help_text = _("The faq page."),
 widget=Textarea(attrs={'rows': '25'})))
\ No newline at end of file
diff --git a/requirements.txt b/requirements.txt
new file mode 100644 (file)
index 0000000..fd43d5c
--- /dev/null
@@ -0,0 +1,10 @@
+markdown
+html5lib
+python-openid
+South
+python-memcached
+django==1.3.7
+django-debug-toolbar
+django-endless-pagination
+pytz
+