Esempio n. 1
0
    livesettings.StringValue(
        FORUM_DATA_RULES,
        'COMMENTS_EDITOR_TYPE',
        default='plain-text',
        choices=COMMENTS_EDITOR_CHOICES,
        description=_('Editor for the comments')
    )
)

settings.register(
    livesettings.BooleanValue(
        FORUM_DATA_RULES,
        'ASK_BUTTON_ENABLED',
        default=True,
        description=_('Enable big Ask button'),
        help_text=_(
            'Disabling this button will reduce number of new questions. '
            'If this button is disabled, the ask button in the search menu '
            'will still be available.'
        )
    )
)


settings.register(
    livesettings.BooleanValue(
        FORUM_DATA_RULES,
        'ENABLE_VIDEO_EMBEDDING',
        default = False,
        description = _('Enable embedding videos. '),
        help_text = _(
Esempio n. 2
0
from askbot.conf.super_groups import LOGIN_USERS_COMMUNICATION
import livesettings
from django.utils.translation import string_concat
from django.utils.translation import ugettext_lazy as _
from askbot.skins import utils as skin_utils

LOGIN_PROVIDERS = livesettings.ConfigurationGroup(
    'LOGIN_PROVIDERS',
    _('Login provider setings'),
    super_group=LOGIN_USERS_COMMUNICATION)

settings.register(
    livesettings.BooleanValue(
        LOGIN_PROVIDERS,
        'TERMS_CONSENT_REQUIRED',
        default=False,
        description=_('Acceptance of terms required at registration'),
        help_text=settings.get_related_settings_info(
            ('FLATPAGES', 'TERMS', True))))

# TODO: remove this - we don't want the local login button
# but instead always show the login/password field when used
settings.register(
    livesettings.BooleanValue(
        LOGIN_PROVIDERS,
        'SIGNIN_ALWAYS_SHOW_LOCAL_LOGIN',
        default=True,
        description=_(
            'Always display local login form and hide "Askbot" button.'),
    ))
Esempio n. 3
0
from askbot.conf.super_groups import CONTENT_AND_UI
import livesettings
from askbot.skins import utils as skin_utils
from django.utils.translation import ugettext_lazy as _


LICENSE_SETTINGS = livesettings.ConfigurationGroup(
    'LICENSE_SETTINGS',
    _('Content License'),
    super_group=CONTENT_AND_UI
)

settings.register(
    livesettings.BooleanValue(
        LICENSE_SETTINGS,
        'USE_LICENSE',
        description=_('Show license clause in the site footer'),
        default=True
    )
)

settings.register(
    livesettings.StringValue(
        LICENSE_SETTINGS,
        'LICENSE_ACRONYM',
        description=_('Short name for the license'),
        default='cc-by-sa'
    )
)

settings.register(
    livesettings.StringValue(
Esempio n. 4
0
        return django_settings.ADMINS[0][1]
    except:
        return ''


settings.register(
    livesettings.StringValue(
        EMAIL,
        'ADMIN_EMAIL',
        default=get_default_admin_email(),
        description=_('Site administrator email address')))

settings.register(
    livesettings.BooleanValue(
        EMAIL,
        'ENABLE_EMAIL_ALERTS',
        default=True,
        description=_('Enable email alerts'),
    ))

settings.register(
    livesettings.BooleanValue(EMAIL,
                              'INSTANT_EMAIL_ALERT_ENABLED',
                              description=_('Enable instant email alerts'),
                              default=True))

settings.register(
    livesettings.BooleanValue(EMAIL,
                              'WELCOME_EMAIL_ENABLED',
                              description=_('Enable welcome email'),
                              default=True))
Esempio n. 5
0
Settings responsible for display of questions lists
"""
from askbot.conf.settings_wrapper import settings
from askbot.conf.super_groups import DATA_AND_FORMATTING
import livesettings
from django.utils.translation import ugettext_lazy as _

QUESTION_LISTS = livesettings.ConfigurationGroup(
    'QUESTION_LISTS',
    _('Listings of questions'),
    super_group=DATA_AND_FORMATTING)

settings.register(
    livesettings.BooleanValue(
        QUESTION_LISTS,
        'ALL_SCOPE_ENABLED',
        default=True,
        description=_('Enable "All Questions" selector'),
        help_text=_('At least one of these selectors must be enabled')))

settings.register(
    livesettings.BooleanValue(
        QUESTION_LISTS,
        'UNANSWERED_SCOPE_ENABLED',
        default=True,
        description=_('Enable "Unanswered Questions" selector'),
        help_text=_('At least one of these selectors must be enabled')))

settings.register(
    livesettings.BooleanValue(
        QUESTION_LISTS,
        'FOLLOWED_SCOPE_ENABLED',
Esempio n. 6
0
                                                super_group=LOGIN_USERS_COMMUNICATION)


settings.register(
    livesettings.LongStringValue(
        USER_SETTINGS,
        'NEW_USER_GREETING',
        default=_('Welcome to our community!'),
        description=_('On-screen greeting shown to the new users')
    )
)

settings.register(
    livesettings.BooleanValue(
        USER_SETTINGS,
        'EDITABLE_SCREEN_NAME',
        default=True,
        description=_('Allow editing user screen name')
    )
)

settings.register(
    livesettings.BooleanValue(
        USER_SETTINGS,
        'SHOW_ADMINS_PRIVATE_USER_DATA',
        default=False,
        description=_('Show email addresses to moderators')
    )
)

settings.register(
    livesettings.BooleanValue(
Esempio n. 7
0
"""Settings for LDAP login for Askbot"""
from askbot.conf.settings_wrapper import settings
from askbot.conf.super_groups import EXTERNAL_SERVICES
import livesettings
from django.utils.translation import ugettext_lazy as _

LDAP_SETTINGS = livesettings.ConfigurationGroup('LDAP_SETTINGS',
                                                _('LDAP login configuration'),
                                                super_group=EXTERNAL_SERVICES)

settings.register(
    livesettings.BooleanValue(
        LDAP_SETTINGS,
        'USE_LDAP_FOR_PASSWORD_LOGIN',
        description=_('Use LDAP authentication for the password login'),
        defaut=False))

settings.register(
    livesettings.BooleanValue(
        LDAP_SETTINGS,
        'LDAP_AUTOCREATE_USERS',
        description=_('Automatically create user accounts when possible'),
        default=False,
        help_text=_(
            'Potentially reduces number of steps in the registration process '
            'but can expose personal information, e.g. when LDAP login name is '
            'the same as email address or real name.')))

LDAP_PROTOCOL_VERSION_CHOICES = (('3', _('Version 3')),
                                 ('2',
                                  _('Version 2 (insecure and deprecated)!!!')))
Esempio n. 8
0
        'GOOGLE_ANALYTICS_KEY',
        description=_('Google Analytics key'),
        help_text=_(
            'Obtain is at <a href="%(url)s">'
            'Google Analytics</a> site, if you '
            'wish to use Google Analytics to monitor '
            'your site'
        ) % {'url': 'http://www.google.com/intl/%s/analytics/' \
                % django_settings.LANGUAGE_CODE }
    )
)

settings.register(
    livesettings.BooleanValue(
        EXTERNAL_KEYS,
        'USE_RECAPTCHA',
        description=_('Enable recaptcha (keys below are required)'),
        default=False))

settings.register(
    livesettings.StringValue(EXTERNAL_KEYS,
                             'RECAPTCHA_KEY',
                             description=_('Recaptcha public key')))

settings.register(
    livesettings.StringValue(
        EXTERNAL_KEYS,
        'RECAPTCHA_SECRET',
        description=_('Recaptcha private key'),
        help_text=_('Recaptcha is a tool that helps distinguish '
                    'real people from annoying spam robots. '
Esempio n. 9
0
    site.save()

    return new_value


settings.register(
    livesettings.StringValue(
        QA_SITE_SETTINGS,
        'APP_URL',
        description=_('Base URL for your Q&A forum, must start with '
                      'http or https'),
        update_callback=app_url_callback))

settings.register(
    livesettings.BooleanValue(
        QA_SITE_SETTINGS,
        'ENABLE_GREETING_FOR_ANON_USER',
        default=True,
        description=_('Check to enable greeting for anonymous user')))

settings.register(
    livesettings.StringValue(QA_SITE_SETTINGS,
                             'GREETING_FOR_ANONYMOUS_USER',
                             default=_('First time here? Check out the FAQ!'),
                             localized=True,
                             hidden=False,
                             description=_(
                                 'Text shown in the greeting message '
                                 'shown to the anonymous user'),
                             help_text=_('Use HTML to format the message ')))