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."),
 
  12 LIMIT_TAG_CREATION = Setting('LIMIT_TAG_CREATION', False, FORUM_SET, dict(
 
  13 label = _("Limit tag creation"),
 
  14 help_text = _("Limit tag creation to super users, staff or users with a minimum reputation."),
 
  18 """ settings for questions """
 
  19 FORM_MIN_QUESTION_TITLE = Setting('FORM_MIN_QUESTION_TITLE', 10, FORUM_SET, dict(
 
  20 label = _("Minimum number of characters for a question's title"),
 
  21 help_text = _("The minimum number of characters a user must enter into the title field of a question.")))
 
  23 # FORM_MAX_QUESTION_TITLE = Setting('FORM_MAX_QUESTION_TITLE', 100, FORUM_SET, dict(
 
  24 # label = _("Maximum number of characters for a question."),
 
  25 # help_text = _("The maximum number of characters a user can enter into the description field to submit a question.")))
 
  27 FORM_MIN_QUESTION_BODY = Setting('FORM_MIN_QUESTION_BODY', 10, FORUM_SET, dict(
 
  28 label = _("Minimum number of characters for a question's content"),
 
  29 help_text = _("The minimum number of characters a user must enter into the content field of a question.")))
 
  31 # FORM_MAX_QUESTION_DESCRIPTION = Setting('FORM_MAX_QUESTION_DESCRIPTION', 600, FORUM_SET, dict(
 
  32 # label = _("Maximum number of characters for a question."),
 
  33 # help_text = _("The maximum number of characters a user can enter into the description field to submit a question.")))
 
  35 FORM_EMPTY_QUESTION_BODY = Setting('FORM_EMPTY_QUESTION_BODY', False, FORUM_SET, dict(
 
  36 label = _("Empty question content"),
 
  37 help_text = _("If a question's content can be empty."),
 
  43 """ settings for tags """
 
  44 FORM_MIN_NUMBER_OF_TAGS = Setting('FORM_MIN_NUMBER_OF_TAGS', 1, FORUM_SET, dict(
 
  45 label = _("Required number of tags per question"),
 
  46 help_text = _("How many tags are required in questions."),
 
  49 FORM_MAX_NUMBER_OF_TAGS = Setting('FORM_MAX_NUMBER_OF_TAGS', 5, FORUM_SET, dict(
 
  50 label = _("Maximum number of tags per question"),
 
  51 help_text = _("How many tags are allowed in questions."),
 
  54 FORM_MIN_LENGTH_OF_TAG = Setting('FORM_MIN_LENGTH_OF_TAG', 1, FORUM_SET, dict(
 
  55 label = _("Minimum length of a tag"),
 
  56 help_text = _("How short a tag can be."),
 
  59 FORM_MAX_LENGTH_OF_TAG = Setting('FORM_MAX_LENGTH_OF_TAG', 20, FORUM_SET, dict(
 
  60 label = _("Maximum length of a tag"),
 
  61 help_text = _("How long a tag can be."),
 
  67 """ settings for comments """
 
  68 FORM_MIN_COMMENT_BODY = Setting('FORM_MIN_COMMENT_BODY', 10, FORUM_SET, dict(
 
  69 label = _("Minimum number of characters for a comment"),
 
  70 help_text = _("The minimum number of characters a user must enter into the body of a comment.")))
 
  72 FORM_MAX_COMMENT_BODY = Setting('FORM_MAX_COMMENT_BODY', 600, FORUM_SET, dict(
 
  73 label = _("Maximum length of comment"),
 
  74 help_text = _("The maximum number of characters a user can enter into the body of a comment.")))
 
  76 FORM_ALLOW_MARKDOWN_IN_COMMENTS = Setting('FORM_ALLOW_MARKDOWN_IN_COMMENTS', True, FORUM_SET, dict(
 
  77 label = _("Allow markdown in comments"),
 
  78 help_text = _("Allow users to use markdown in comments."),
 
  81 FORM_GRAVATAR_IN_COMMENTS = Setting('FORM_GRAVATAR_IN_COMMENTS', False, FORUM_SET, dict(
 
  82 label = _("Show author gravatar in comments"),
 
  83 help_text = _("Show the gravatar image of a comment author."),