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)
9 """ settings for questions """
10 FORM_MIN_QUESTION_TITLE = Setting('FORM_MIN_QUESTION_TITLE', 10, FORUM_SET, dict(
11 label = _("Minimum number of characters for a question's title"),
12 help_text = _("The minimum number of characters a user must enter into the title field of a question.")))
14 # FORM_MAX_QUESTION_TITLE = Setting('FORM_MAX_QUESTION_TITLE', 100, FORUM_SET, dict(
15 # label = _("Maximum number of characters for a question."),
16 # help_text = _("The maximum number of characters a user can enter into the description field to submit a question.")))
18 FORM_MIN_QUESTION_BODY = Setting('FORM_MIN_QUESTION_BODY', 10, FORUM_SET, dict(
19 label = _("Minimum number of characters for a question's content"),
20 help_text = _("The minimum number of characters a user must enter into the content field of a question.")))
22 # FORM_MAX_QUESTION_DESCRIPTION = Setting('FORM_MAX_QUESTION_DESCRIPTION', 600, FORUM_SET, dict(
23 # label = _("Maximum number of characters for a question."),
24 # help_text = _("The maximum number of characters a user can enter into the description field to submit a question.")))
26 FORM_EMPTY_QUESTION_BODY = Setting('FORM_EMPTY_QUESTION_BODY', False, FORUM_SET, dict(
27 label = _("Empty question content"),
28 help_text = _("If a question's content can be empty."),
32 FORM_MIN_NUMBER_OF_TAGS = Setting('FORM_MIN_NUMBER_OF_TAGS', 1, FORUM_SET, dict(
33 label = _("Required number of tags per question"),
34 help_text = _("How many tags are required in questions."),
37 FORM_MAX_NUMBER_OF_TAGS = Setting('FORM_MAX_NUMBER_OF_TAGS', 5, FORUM_SET, dict(
38 label = _("Maximum number of tags per question"),
39 help_text = _("How many tags are allowed in questions."),
44 """ settings for comments """
45 FORM_MIN_COMMENT_BODY = Setting('FORM_MIN_COMMENT_BODY', 10, FORUM_SET, dict(
46 label = _("Minimum number of characters for a comment"),
47 help_text = _("The minimum number of characters a user must enter into the body of a comment.")))
49 FORM_MAX_COMMENT_BODY = Setting('FORM_MAX_COMMENT_BODY', 600, FORUM_SET, dict(
50 label = _("Maximum length of comment"),
51 help_text = _("The maximum number of characters a user can enter into the body of a comment.")))
53 FORM_ALLOW_MARKDOWN_IN_COMMENTS = Setting('FORM_ALLOW_MARKDOWN_IN_COMMENTS', True, FORUM_SET, dict(
54 label = _("Allow markdown in comments"),
55 help_text = _("Allow users to use markdown in comments."),
58 FORM_GRAVATAR_IN_COMMENTS = Setting('FORM_GRAVATAR_IN_COMMENTS', False, FORUM_SET, dict(
59 label = _("Show author gravatar in comments"),
60 help_text = _("Show the gravatar image of a comment author."),