Esempio n. 1
0
from django.conf import settings as django_settings

EXTERNAL_KEYS = livesettings.ConfigurationGroup(
    'EXTERNAL_KEYS',
    _('Keys for external services'),
    super_group=EXTERNAL_SERVICES
)

settings.register(
    livesettings.StringValue(
        EXTERNAL_KEYS,
        'GOOGLE_SITEMAP_CODE',
        description=_('Google site verification key'),
        help_text=_(
            'This key helps google index your site '
            'please obtain is at '
            '<a href="%(url)s?hl=%(lang)s">'
            'google webmasters tools site</a>'
        ) % {
            'url': const.DEPENDENCY_URLS['google-webmaster-tools'],
            'lang': django_settings.LANGUAGE_CODE,
        }
    )
)

settings.register(
    livesettings.StringValue(
        EXTERNAL_KEYS,
        'GOOGLE_ANALYTICS_KEY',
        description=_('Google Analytics key'),
        help_text=_(
            'Obtain is at <a href="%(url)s">'
Esempio n. 2
0
EMAIL_SUBJECT_PREFIX = getattr(django_settings, 'EMAIL_SUBJECT_PREFIX', '')

EMAIL = livesettings.ConfigurationGroup(
            'EMAIL',
            _('Email and email alert settings'),
            super_group = LOGIN_USERS_COMMUNICATION
        )

settings.register(
    livesettings.StringValue(
        EMAIL,
        'EMAIL_SUBJECT_PREFIX',
        default = EMAIL_SUBJECT_PREFIX,
        description = _('Prefix for the email subject line'),
        help_text = _(
                'This setting takes default from the django setting'
                'EMAIL_SUBJECT_PREFIX. A value entered here will override'
                'the default.'
            )
    )
)

settings.register(
    livesettings.BooleanValue(
        EMAIL,
        'ENABLE_EMAIL_ALERTS',
        default = True,
        description = _('Enable email alerts'),
    )
)
Esempio n. 3
0
    livesettings.BooleanValue(
        FORUM_DATA_RULES,
        'FORCE_LOWERCASE_TAGS',
        default=False,
        description=_('Force lowercase the tags'),
        help_text=_(
            'Attention: after checking this, please back up the database, '
            'and run a management command: '
            '<code>python manage.py fix_question_tags</code> to globally '
            'rename the tags')))

settings.register(
    livesettings.StringValue(FORUM_DATA_RULES,
                             'TAG_LIST_FORMAT',
                             default='list',
                             choices=const.TAG_LIST_FORMAT_CHOICES,
                             description=_('Format of tag list'),
                             help_text=_('Select the format to show tags in, '
                                         'either as a simple list, or as a '
                                         'tag cloud')))

settings.register(
    livesettings.BooleanValue(
        FORUM_DATA_RULES,
        'USE_WILDCARD_TAGS',
        default=False,
        description=_('Use wildcard tags'),
        help_text=_('Wildcard tags can be used to follow or ignore '
                    'many tags at once, a valid wildcard tag has a single '
                    'wildcard at the very end')))

settings.register(
Esempio n. 4
0
        description=_('Allow only registered user to access the forum'),
    )
)

EMAIL_VALIDATION_CASE_CHOICES = (
    ('nothing', _('nothing - not required')),
    ('see-content', _('access to content')),
    #'post-content', _('posting content'),
)

settings.register(
    livesettings.StringValue(
        ACCESS_CONTROL,
        'REQUIRE_VALID_EMAIL_FOR',
        default='nothing',
        choices=EMAIL_VALIDATION_CASE_CHOICES,
        description=_(
            'Require valid email for'
        )
    )
)

settings.register(
    livesettings.LongStringValue(
        ACCESS_CONTROL,
        'ALLOWED_EMAILS',
        default='',
        description=_('Allowed email addresses'),
        help_text=_('Please use space to separate the entries')
    )
)
Esempio n. 5
0
from openode.deps import livesettings
from openode.conf.settings_wrapper import settings
from openode.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')
    )
)
Esempio n. 6
0
                                'then submit this whole form.'),
                            default='/images/nophoto.png',
                            url_resolver=skin_utils.get_media_url))

settings.register(
    livesettings.BooleanValue(
        USER_SETTINGS,
        'ENABLE_GRAVATAR',
        default=True,
        description=_('Use automatic avatars from gravatar.com'),
        help_text=
        _('Check this option if you want to allow the use of gravatar.com for avatars. Please, note that this feature might take about 10 minutes to become fully effective. You will have to enable uploaded avatars as well. For more information, please visit <a href="http://openode.org/doc/optional-modules.html#uploaded-avatars">this page</a>.'
          )))

settings.register(
    livesettings.StringValue(
        USER_SETTINGS,
        'GRAVATAR_TYPE',
        default='identicon',
        choices=const.GRAVATAR_TYPE_CHOICES,
        description=_('Default Gravatar icon type'),
        help_text=
        _('This option allows you to set the default avatar type for email addresses without associated gravatar images.  For more information, please visit <a href="http://en.gravatar.com/site/implement/images/">this page</a>.'
          )))

settings.register(
    livesettings.StringValue(USER_SETTINGS,
                             'NAME_OF_ANONYMOUS_USER',
                             default='',
                             description=_('Name for the Anonymous user')))
Esempio n. 7
0
Q&A website settings - title, desctiption, basic urls
keywords
"""
from openode.conf.settings_wrapper import settings
from openode.conf.super_groups import CONTENT_AND_UI
from openode.deps import livesettings
from django.utils.translation import ugettext as _

QA_SITE_SETTINGS = livesettings.ConfigurationGroup(
    'QA_SITE_SETTINGS',
    _('URLS, keywords & greetings'),
    super_group=CONTENT_AND_UI)

settings.register(
    livesettings.StringValue(QA_SITE_SETTINGS,
                             'APP_TITLE',
                             default=u'OPENODE',
                             description=_('Site title for the Q&A instance')))

settings.register(
    livesettings.StringValue(QA_SITE_SETTINGS,
                             'APP_SUBTITLE',
                             default=u'smarter knowledge',
                             description=_('Site sub-title for the instance')))

settings.register(
    livesettings.StringValue(
        QA_SITE_SETTINGS,
        'APP_KEYWORDS',
        default=u'Openode,Askbot,CNPROG,forum,community',
        description=_('Comma separated list of instance keywords')))