1 from base import Setting, SettingSet
2 from forms import StringListWidget
4 from django.utils.encoding import smart_unicode
5 from django.utils.translation import ugettext_lazy as _
6 from django.forms.widgets import Textarea, RadioSelect
8 MODERATION_SET = SettingSet('moderation', _('Moderation settings'), _("Define the moderation workflow of your site"), 100)
10 USE_CANNED_COMMENTS = Setting('USE_CANNED_COMMENTS', True, MODERATION_SET, dict(
11 label = _("Use canned comments"),
12 help_text = _("If you check, the canned comments feature will be activated, allowing moderators to use canned patterns for their comments."),
15 CANNED_COMMENTS = Setting('CANNED_COMMENTS',
17 "We require all postings to have a clear, specific QUESTION in the title field. Please edit this right away to rephrase the title as a proper question.",
20 label = _("Canned comments"),
22 <p>Create some canned comments to be used for easier moderation. You can access the {{ post }} and {{ settings }} variables.</p>
23 <p>If you want to access the current post author username you can use {{ post.author }}, for the question title use {{ post.title }}.</p>
24 <p>To get the application title use {{ settings.APP_TITLE }}. All settings are accessible through the settings object.</p>
26 widget=StringListWidget))
28 FLAG_TYPES = Setting('FLAG_TYPES',
29 ["Spam", "Advertising", "Offensive, Abusive, or Inappropriate", "Content violates terms of use", "Copyright Violation",
30 "Misleading", "Someone is not being nice", "Not relevant/off-topic", "Other"],
32 label = _("Flag Reasons"),
33 help_text = _("Create some flag reasons to use in the flag post popup."),
34 widget=StringListWidget))
37 CLOSE_TYPES = Setting('CLOSE_TYPES',
38 ["Duplicate Question", "Question is off-topic or not relevant", "Too subjective and argumentative",
39 "The question is answered, right answer was accepted", "Problem is not reproducible or outdated", "Other"],
41 label = _("Close Reasons"),
42 help_text = _("Create some close reasons to use in the close question popup."),
43 widget=StringListWidget))
46 # Flag control position
47 REPORT_OFFENSIVE_CONTROL_POSITION_CHOICES = (
48 ('more', _('Position it in the "More" menu')),
49 ('controls', _('Position it in main controls')),
52 REPORT_OFFENSIVE_CONTROL_POSITION = Setting('REPORT_OFFENSIVE_CONTROL_POSITION', 'more', MODERATION_SET, dict(
53 label = _("Position of report control"),
54 help_text = _("Choose the position of the \"report (0)\" control of nodes."),
56 choices=REPORT_OFFENSIVE_CONTROL_POSITION_CHOICES,