--- /dev/null
+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
+
+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()
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"""
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