2 from base import Setting, SettingSet
3 from django.utils.translation import ugettext_lazy as _
5 FORUM_SET = SettingSet('form', _('Form settings'), _("General settings for the OSQA forms."), 10)
7 WIKI_ON = Setting('WIKI_ON', True, FORUM_SET, dict(
8 label = _("Enable community wiki"),
9 help_text = _("Can questions or answers be marked as community wiki."),
13 """ settings for questions """
14 FORM_MIN_QUESTION_TITLE = Setting('FORM_MIN_QUESTION_TITLE', 10, FORUM_SET, dict(
15 label = _("Minimum number of characters for a question's title"),
16 help_text = _("The minimum number of characters a user must enter into the title field of a question.")))
18 # FORM_MAX_QUESTION_TITLE = Setting('FORM_MAX_QUESTION_TITLE', 100, FORUM_SET, dict(
19 # label = _("Maximum number of characters for a question."),
20 # help_text = _("The maximum number of characters a user can enter into the description field to submit a question.")))
22 FORM_MIN_QUESTION_BODY = Setting('FORM_MIN_QUESTION_BODY', 10, FORUM_SET, dict(
23 label = _("Minimum number of characters for a question's content"),
24 help_text = _("The minimum number of characters a user must enter into the content field of a question.")))
26 # FORM_MAX_QUESTION_DESCRIPTION = Setting('FORM_MAX_QUESTION_DESCRIPTION', 600, FORUM_SET, dict(
27 # label = _("Maximum number of characters for a question."),
28 # help_text = _("The maximum number of characters a user can enter into the description field to submit a question.")))
30 FORM_EMPTY_QUESTION_BODY = Setting('FORM_EMPTY_QUESTION_BODY', False, FORUM_SET, dict(
31 label = _("Empty question content"),
32 help_text = _("If a question's content can be empty."),
36 FORM_MIN_NUMBER_OF_TAGS = Setting('FORM_MIN_NUMBER_OF_TAGS', 1, FORUM_SET, dict(
37 label = _("Required number of tags per question"),
38 help_text = _("How many tags are required in questions."),
41 FORM_MAX_NUMBER_OF_TAGS = Setting('FORM_MAX_NUMBER_OF_TAGS', 5, FORUM_SET, dict(
42 label = _("Maximum number of tags per question"),
43 help_text = _("How many tags are allowed in questions."),
48 """ settings for comments """
49 FORM_MIN_COMMENT_BODY = Setting('FORM_MIN_COMMENT_BODY', 10, FORUM_SET, dict(
50 label = _("Minimum number of characters for a comment"),
51 help_text = _("The minimum number of characters a user must enter into the body of a comment.")))
53 FORM_MAX_COMMENT_BODY = Setting('FORM_MAX_COMMENT_BODY', 600, FORUM_SET, dict(
54 label = _("Maximum length of comment"),
55 help_text = _("The maximum number of characters a user can enter into the body of a comment.")))
57 FORM_ALLOW_MARKDOWN_IN_COMMENTS = Setting('FORM_ALLOW_MARKDOWN_IN_COMMENTS', True, FORUM_SET, dict(
58 label = _("Allow markdown in comments"),
59 help_text = _("Allow users to use markdown in comments."),
62 FORM_GRAVATAR_IN_COMMENTS = Setting('FORM_GRAVATAR_IN_COMMENTS', False, FORUM_SET, dict(
63 label = _("Show author gravatar in comments"),
64 help_text = _("Show the gravatar image of a comment author."),