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=_( # '<em>Note: please read <a href="%(url)s">read this</a> first.</em>'
from askbot import const import re USER_SETTINGS = livesettings.ConfigurationGroup( 'USER_SETTINGS', _('User settings'), 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( USER_SETTINGS, 'AUTOFILL_USER_DATA', default=True, description=_('Auto-fill user name, email, etc on registration'),
from django.utils.translation import ugettext_lazy as _ from askbot.conf.settings_wrapper import settings from livesettings.values import ConfigurationGroup from livesettings import values from askbot.conf.super_groups import CONTENT_AND_UI LEADING_SIDEBAR = ConfigurationGroup( 'LEADING_SIDEBAR', _('Common left sidebar'), super_group=CONTENT_AND_UI ) settings.register( values.BooleanValue( LEADING_SIDEBAR, 'ENABLE_LEADING_SIDEBAR', description=_('Enable left sidebar'), default=False, ) ) settings.register( values.LongStringValue( LEADING_SIDEBAR, 'LEADING_SIDEBAR', description=_('HTML for the left sidebar'), default='', help_text=_( 'Use this area to enter content at the LEFT sidebar ' 'in HTML format. When using this option, please ' 'use the HTML validation service to make sure that ' 'your input is valid and works well in all browsers.'
settings.register( values.LongStringValue( SIDEBAR_QUESTION, 'QUESTION_PAGE_TOP_BANNER', description=_('Top banner'), default='', localized=True, help_text=_('When using this option, please ' 'use the HTML validation service to make sure that ' 'your input is valid and works well in all browsers.'))) settings.register( values.BooleanValue( SIDEBAR_QUESTION, 'QUESTION_PAGE_TOP_BANNER_ANON_ONLY', default=False, description=_('Show above only to anonymous users'), )) settings.register( values.LongStringValue( SIDEBAR_QUESTION, 'QUESTION_PAGE_ANSWER_BANNER', description=_('Answers banner'), default='', localized=True, help_text=_('This banner will show under the first answer. ' 'When using this option, please ' 'use the HTML validation service to make sure that ' 'your input is valid and works well in all browsers.')))
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 ')))
clause used in askbot instances""" from django.utils.translation import ugettext_lazy as _ from askbot import const from askbot.conf.settings_wrapper import settings from askbot.conf.super_groups import CONTENT_AND_UI from livesettings import values as livesettings from askbot.skins import utils as skin_utils 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( LICENSE_SETTINGS, 'LICENSE_TITLE', description=_('Full name of the license'), default=_('Creative Commons Attribution Share Alike 3.0'),
""" from django.utils.translation import ugettext_lazy as _ from askbot.conf.settings_wrapper import settings from livesettings.values import ConfigurationGroup from livesettings import values from askbot.conf.super_groups import CONTENT_AND_UI SIDEBAR_PROFILE = ConfigurationGroup('SIDEBAR_PROFILE', _('User profile sidebar'), super_group=CONTENT_AND_UI) settings.register( values.LongStringValue( SIDEBAR_PROFILE, 'SIDEBAR_PROFILE', description=_('Custom sidebar'), default='', localized=True, help_text=_( 'Use this area to enter content at the TOP of the sidebar in HTML ' 'format. When using this option (as well as the sidebar footer), ' 'please use the HTML validation service to make sure that your ' 'input is valid and works well in all browsers.'))) settings.register( values.BooleanValue( SIDEBAR_PROFILE, 'SIDEBAR_PROFILE_ANON_ONLY', description=_('Show the text entered above only to anonymous users'), default=False))
"""Settings for LDAP login for Askbot""" from django.utils.translation import ugettext_lazy as _ from askbot.conf.settings_wrapper import settings from askbot.conf.super_groups import EXTERNAL_SERVICES from livesettings import values as livesettings 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'), default=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)!!!')))
from django.utils.translation import ugettext_lazy as _ from django.utils.text import format_lazy from askbot.conf.settings_wrapper import settings from askbot.conf.super_groups import LOGIN_USERS_COMMUNICATION from livesettings import values as livesettings ACCESS_CONTROL = livesettings.ConfigurationGroup( 'ACCESS_CONTROL', _('Access control settings'), super_group=LOGIN_USERS_COMMUNICATION) settings.register( livesettings.BooleanValue( ACCESS_CONTROL, 'READ_ONLY_MODE_ENABLED', default=False, description=_('Make site read-only'), )) settings.register( livesettings.StringValue( ACCESS_CONTROL, 'READ_ONLY_MESSAGE', default=_('The site is temporarily read-only. ' 'Only viewing of the content is possible at the moment.'))) settings.register( livesettings.BooleanValue( ACCESS_CONTROL, 'ASKBOT_CLOSED_FORUM_MODE', default=False,
from askbot.conf.settings_wrapper import settings from askbot.conf.super_groups import LOGIN_USERS_COMMUNICATION from livesettings import values as livesettings from askbot.skins import utils as skin_utils from askbot.utils.loading import module_exists LOGIN_PROVIDERS = livesettings.ConfigurationGroup( 'LOGIN_PROVIDERS', _('Login provider settings'), 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)))) settings.register( livesettings.BooleanValue( LOGIN_PROVIDERS, 'SIGNIN_WORDPRESS_SITE_ENABLED', default=False, description=_('Activate to allow login with self-hosted ' 'wordpress site'), help_text=_('to activate this feature you must fill out the wordpress ' 'xml-rpc setting bellow'))) settings.register(
EXTERNAL_KEYS, '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 '
values.LongStringValue( SIDEBAR_MAIN, 'SIDEBAR_MAIN_HEADER', description=_('Custom sidebar header'), default='', localized=True, help_text=_( 'Use this area to enter content at the TOP of the sidebar in HTML ' 'format. When using this option (as well as the sidebar footer), ' 'please use the HTML validation service to make sure that your ' 'input is valid and works well in all browsers.'))) settings.register( values.BooleanValue( SIDEBAR_MAIN, 'SIDEBAR_MAIN_HEADER_ANON_ONLY', description=_('Show the text entered above only to anonymous users'), default=False, )) settings.register( values.BooleanValue( SIDEBAR_MAIN, 'SIDEBAR_MAIN_SHOW_AVATARS', description=_('Show avatar block in sidebar'), help_text=_('Uncheck this if you want to hide the avatar block ' 'from the sidebar '), default=True)) settings.register( values.IntegerValue( SIDEBAR_MAIN,
return django_settings.ADMINS[0][1] except (AttributeError, IndexError): 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))
Settings responsible for display of questions lists """ from django.utils.translation import ugettext_lazy as _ from askbot.conf.settings_wrapper import settings from askbot.conf.super_groups import DATA_AND_FORMATTING from livesettings import values as livesettings 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',
"""Settings for content moderation and spam control""" from django.utils.translation import ugettext_lazy as _ from askbot import const from livesettings import values as 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')))