Example #1
0
from django.conf import settings as django_settings
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))
    )
)

settings.register(
    livesettings.BooleanValue(
        LOGIN_PROVIDERS,
        'PASSWORD_REGISTER_SHOW_PROVIDER_BUTTONS',
        default=True,
        description=_('Show alternative login provider buttons on the password "Sign Up" page'),
    )
)

#todo: remove this - we don't want the local login button
#but instead always show the login/password field when used
settings.register(
Example #2
0
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.'),
    )
)

settings.register(
Example #3
0
        default=5,
        description=_("Max. number of reminders to send " "to accept the best answer"),
    )
)

settings.register(
    livesettings.BooleanValue(
        EMAIL,
        "BLANK_EMAIL_ALLOWED",
        default=False,
        description=_("Allow blank email"),
        help_text=string_concat(
            _("DANGER: makes impossible account recovery by email."),
            " ",
            settings.get_related_settings_info(
                ("ACCESS_CONTROL", "REQUIRE_VALID_EMAIL_FOR", True, _("Must be not be required"))
            ),
        ),
    )
)

settings.register(
    livesettings.StringValue(
        EMAIL,
        "ANONYMOUS_USER_EMAIL",
        default="*****@*****.**",
        description=_("Fake email for anonymous user"),
        help_text=_("Use this setting to control gravatar for email-less user"),
    )
)
Example #4
0
)

settings.register(
    LongStringValue(
        FLATPAGES,
        "TERMS",
        description=_("Terms and conditions"),
        localized=True,
        help_text=string_concat(
            _(
                'Save, then <a href="http://validator.w3.org/">'
                'use HTML validator</a> on the "terms" page to check '
                "your input."
            ),
            " ",
            settings.get_related_settings_info(("LOGIN_PROVIDERS", "TERMS_ACCEPTANCE_REQUIRED", False)),
        ),
    )
)

# TODO: merge this with mandatory tags
settings.register(  # this field is not editable manually
    LongStringValue(
        FLATPAGES,
        "CATEGORY_TREE",
        description="Category tree",  # No need to translate
        localized=True,
        default='[["dummy",[]]]',  # Empty array of arrays in json
        help_text=_("Do not edit this field manually!!!")
        # hidden = True
    )
Example #5
0
        description=_(
            'Max. number of reminders to send to accept the best answer')
    )
)

settings.register(
    livesettings.BooleanValue(
        EMAIL,
        'BLANK_EMAIL_ALLOWED',
        default=False,
        description=_('Allow blank email'),
        help_text=string_concat(
            _('DANGER: makes impossible account recovery by email.'),
            ' ',
            settings.get_related_settings_info(
                ('ACCESS_CONTROL', 'REQUIRE_VALID_EMAIL_FOR', True, _('Must be not be required')),
            )
        )
    )
)

settings.register(
    livesettings.StringValue(
        EMAIL,
        'ANONYMOUS_USER_EMAIL',
        default='*****@*****.**',
        description=_('Fake email for anonymous user'),
        help_text=_('Use this setting to control gravatar for email-less user')
    )
)
Example #6
0
    )
)

settings.register(
    LongStringValue(
        FLATPAGES,
        'TERMS',
        description=_('Terms and conditions'),
        localized=True,
        help_text=string_concat(
            _(
                'Save, then <a href="http://validator.w3.org/">'
                'use HTML validator</a> on the "terms" page to check your input.'
            ),
            ' ',
            settings.get_related_settings_info( ('LOGIN_PROVIDERS' , 'TERMS_ACCEPTANCE_REQUIRED', False))
        )
    )
)

#todo: merge this with mandatory tags
settings.register(#this field is not editable manually
    LongStringValue(
        FLATPAGES,
        'CATEGORY_TREE',
        description='Category tree',#no need to translate
        localized=True,
        default='[["dummy",[]]]',#empty array of arrays in json
        help_text=_('Do not edit this field manually!!!')
        #hidden = True
    )
Example #7
0
        description=_(
            'Max. number of reminders to send to accept the best answer')
    )
)

settings.register(
    livesettings.BooleanValue(
        EMAIL,
        'BLANK_EMAIL_ALLOWED',
        default=False,
        description=_('Allow blank email'),
        help_text=string_concat(
            _('DANGER: makes impossible account recovery by email.'),
            ' ',
            settings.get_related_settings_info(
                ('ACCESS_CONTROL', 'REQUIRE_VALID_EMAIL_FOR', True, _('Must be optional')),
            )
        )
    )
)

settings.register(
    livesettings.StringValue(
        EMAIL,
        'ANONYMOUS_USER_EMAIL',
        default='*****@*****.**',
        description=_('Fake email for anonymous user'),
        help_text=_('Use this setting to control gravatar for email-less user')
    )
)