summaryrefslogtreecommitdiffstats
path: root/forum/conf/forum_data_rules.py
diff options
context:
space:
mode:
Diffstat (limited to 'forum/conf/forum_data_rules.py')
-rw-r--r--forum/conf/forum_data_rules.py53
1 files changed, 53 insertions, 0 deletions
diff --git a/forum/conf/forum_data_rules.py b/forum/conf/forum_data_rules.py
new file mode 100644
index 00000000..fcce0987
--- /dev/null
+++ b/forum/conf/forum_data_rules.py
@@ -0,0 +1,53 @@
+"""
+Settings for forum data display and entry
+"""
+from forum.conf.settings_wrapper import settings
+from livesettings import ConfigurationGroup, BooleanValue, IntegerValue
+from livesettings import StringValue
+from django.utils.translation import ugettext as _
+from forum import const
+
+FORUM_DATA_RULES = ConfigurationGroup(
+ 'FORUM_DATA_RULES',
+ _('Settings for forum data entry and display')
+ )
+
+settings.register(
+ BooleanValue(
+ FORUM_DATA_RULES,
+ 'WIKI_ON',
+ default=True,
+ description=_('Enable/disable community wiki feature')
+ )
+)
+
+settings.register(
+ IntegerValue(
+ FORUM_DATA_RULES,
+ 'MAX_TAG_LENGTH',
+ default=20,
+ description=_('Maximum length of tag (number of characters)')
+ )
+)
+
+#todo: looks like there is a bug in livesettings
+#that does not allow Integer values with defaults and choices
+settings.register(
+ StringValue(
+ FORUM_DATA_RULES,
+ 'DEFAULT_QUESTIONS_PAGE_SIZE',
+ choices=const.PAGE_SIZE_CHOICES,
+ default='30',
+ description=_('Number of questions to list by default')
+ )
+)
+
+settings.register(
+ StringValue(
+ FORUM_DATA_RULES,
+ 'UNANSWERED_QUESTION_MEANING',
+ choices=const.UNANSWERED_QUESTION_MEANING_CHOICES,
+ default='NO_ACCEPTED_ANSWERS',
+ description=_('What should "unanswered question" mean?')
+ )
+)