1 from forms import CommaStringListWidget
2 from base import Setting, SettingSet
3 from django.utils.translation import ugettext as _
5 USERS_SET = SettingSet('users', _('Users settings'), _("General settings for the OSQA users."), 20)
7 EDITABLE_SCREEN_NAME = Setting('EDITABLE_SCREEN_NAME', False, USERS_SET, dict(
8 label = _("Editable screen name"),
9 help_text = _("Allow users to alter their screen name."),
12 MIN_USERNAME_LENGTH = Setting('MIN_USERNAME_LENGTH', 3, USERS_SET, dict(
13 label = _("Minimum username length"),
14 help_text = _("The minimum length (in character) of a username.")))
16 RESERVED_USERNAMES = Setting('RESERVED_USERNAMES',
17 [_('fuck'), _('shit'), _('ass'), _('sex'), _('add'), _('edit'), _('save'), _('delete'), _('manage'), _('update'), _('remove'), _('new')]
19 label = _("Disabled usernames"),
20 help_text = _("A comma separated list of disabled usernames (usernames not allowed during a new user registration)."),
21 widget=CommaStringListWidget))
23 EMAIL_UNIQUE = Setting('EMAIL_UNIQUE', True, USERS_SET, dict(
24 label = _("Force unique email"),
25 help_text = _("Should each user have an unique email.")))