blob: 969fbaf9bd3cc5c34dcd635ad8dafeeaf8555357 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
"""Settings for content moderation and spam control"""
from django.utils.translation import ugettext_lazy as _
from askbot import const
from askbot.deps import livesettings
from askbot.conf.settings_wrapper import settings
from askbot.conf.super_groups import EXTERNAL_SERVICES
SPAM_AND_MODERATION = livesettings.ConfigurationGroup(
'SPAM_AND_MODERATION',
_('Akismet spam protection'),
super_group = EXTERNAL_SERVICES
)
settings.register(
livesettings.BooleanValue(
SPAM_AND_MODERATION,
'USE_AKISMET',
description=_('Enable Akismet spam detection(keys below are required)'),
default=False,
help_text = _(
'To get an Akismet key please visit '
'<a href="%(url)s">Akismet site</a>'
) % {'url': const.DEPENDENCY_URLS['akismet']}
)
)
settings.register(
livesettings.StringValue(
SPAM_AND_MODERATION,
'AKISMET_API_KEY',
description=_('Akismet key for spam detection')
)
)
|