Beispiel #1
0
                 'ENABLE_AUTO_LINKING',
                 description=_('Enable autolinking with specific patterns'),
                 help_text=_('If you enable this feature, '
                             'the application  will be able to '
                             'detect patterns and auto link to URLs'),
                 default=False))

settings.register(
    LongStringValue(MARKUP,
                    'AUTO_LINK_PATTERNS',
                    description=_('Regexes to detect the link patterns'),
                    help_text=_(
                        'Enter valid regular expressions for the patterns,'
                        ' one per line.'
                        ' For example to'
                        ' detect a bug pattern like #bug123,'
                        ' use the following regex: #bug(\d+). The numbers'
                        ' captured by the pattern in the parentheses will'
                        ' be transferred to the link url template.'
                        ' Please look up more information about regular'
                        ' expressions elsewhere. Invalid expressions will'
                        ' not be accepted.'),
                    update_callback=regex_settings_validation,
                    default=''))

settings.register(
    LongStringValue(
        MARKUP,
        'AUTO_LINK_URLS',
        description=_('URLs for autolinking'),
        help_text=_(
            'Here, please enter url templates for the patterns'
Beispiel #2
0
"""
Q&A forum flatpages (about, etc.)
"""
from askbot.conf.settings_wrapper import settings
from askbot.deps.livesettings import ConfigurationGroup, LongStringValue
from django.utils.translation import ugettext as _

FLATPAGES = ConfigurationGroup('FLATPAGES',
                               _('Flatpages - about, privacy policy, etc.'))

settings.register(
    LongStringValue(
        FLATPAGES,
        'FORUM_ABOUT',
        description=_('Text of the Q&A forum About page (html format)'),
        help_text=\
        _(
            'Save, then <a href="http://validator.w3.org/">'
            'use HTML validator</a> on the "about" page to check your input.'
        )
    )
)

settings.register(
    LongStringValue(
        FLATPAGES,
        'FORUM_PRIVACY',
        description=_('Text of the Q&A forum Privacy Policy (html format)'),
        help_text=\
        _(
            'Save, then <a href="http://validator.w3.org/">'
            'use HTML validator</a> on the "privacy" page to check your input.'
Beispiel #3
0
from askbot.deps.livesettings import ConfigurationGroup, LongStringValue
from askbot.conf.super_groups import CONTENT_AND_UI
from django.utils.translation import ugettext_lazy as _

FLATPAGES = ConfigurationGroup(
    'FLATPAGES',
    _('Messages and pages - about, privacy policy, etc.'),
    super_group=CONTENT_AND_UI)

settings.register(
    LongStringValue(
        FLATPAGES,
        'FORUM_ABOUT',
        description=_('Text of the Q&A forum About page (html format)'),
        localized=True,
        help_text=\
        _(
            'Save, then <a href="http://validator.w3.org/">'
            'use HTML validator</a> on the "about" page to check your input.'
        )
    )
)

settings.register(
    LongStringValue(
        FLATPAGES,
        'FORUM_FAQ',
        description=_('Text of the Q&A forum FAQ page (html format)'),
        localized=True,
        help_text=\
        _(
Beispiel #4
0
settings.register(
    StringValue(
        MODERATION,
        'CONTENT_MODERATION_MODE',
        choices=CONTENT_MODERATION_MODE_CHOICES,
        default='flags',
        description=_('Content moderation method'),
        help_text=_(
            "Audit is made after the posts are published, pre-moderation "
            "prevents publishing before moderator's decision.")))

settings.register(
    LongStringValue(MODERATION,
                    'FORBIDDEN_PHRASES',
                    default='',
                    description=_('Reject all posts with these phrases'),
                    help_text=_(
                        'Enter one phrase per line (case-insensitive). '
                        'Posts with these phrases will be rejected '
                        'without moderation.')))

settings.register(
    LongStringValue(MODERATION,
                    'INVITED_MODERATORS',
                    default='',
                    description=_('Invited moderators'),
                    help_text=_(
                        'Use one line per user; on each line enter '
                        'email address and user name separated by spaces')))

settings.register(
    BooleanValue(MODERATION,
Beispiel #5
0
from askbot.conf.super_groups import CONTENT_AND_UI
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import string_concat

FLATPAGES = ConfigurationGroup(
    'FLATPAGES',
    _('Messages and pages - about, privacy policy, etc.'),
    super_group=CONTENT_AND_UI)

settings.register(
    LongStringValue(
        FLATPAGES,
        'FORUM_ABOUT',
        description=_('Text of the Q&amp;A forum About page (html format)'),
        default='',
        localized=True,
        help_text=\
        _(
            'Save, then <a href="http://validator.w3.org/">'
            'use HTML validator</a> on the "about" page to check your input.'
        )
    )
)

settings.register(
    LongStringValue(
        FLATPAGES,
        'FORUM_HELP',
        description=_('Text of the Help page (html format)'),
        default='',
        localized=True,
        help_text=\
Beispiel #6
0
settings.register(
    StringValue(
        MODERATION,
        'CONTENT_MODERATION_MODE',
        choices=CONTENT_MODERATION_MODE_CHOICES,
        default='flags',
        description=_('Content moderation method'),
        help_text=
        _("Audit is made after the posts are published, pre-moderation prevents publishing before moderator's decision."
          )))

settings.register(
    LongStringValue(MODERATION,
                    'FORBIDDEN_PHRASES',
                    default='',
                    description=_('Reject all posts with these phrases'),
                    help_text=_(
                        'Enter one phrase per line (case-insensitive). '
                        'Posts with these phrases will be rejected '
                        'without moderation.')))

settings.register(
    BooleanValue(MODERATION,
                 'MODERATE_IMAGES',
                 default=False,
                 description=_('Enable image moderation')))

settings.register(
    BooleanValue(MODERATION,
                 'MODERATE_LINKS',
                 default=False,
                 description=_('Enable link moderation')))